{"id":30290,"date":"2026-10-02T09:27:00","date_gmt":"2026-10-02T08:27:00","guid":{"rendered":"https:\/\/www.web-systems.pl\/?p=30290"},"modified":"2026-10-13T14:55:58","modified_gmt":"2026-10-13T13:55:58","slug":"xml-sitemap-what-to-include-how-to-submit","status":"publish","type":"post","link":"https:\/\/www.web-systems.pl\/en\/xml-sitemap-what-to-include-how-to-submit\/","title":{"rendered":"XML sitemap: what to put in it and how to submit it to Google"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">An XML sitemap is simply a file listing the URLs you want to show Google. Only canonical, working pages go into it. Then you submit it in the robots.txt file and in Google Search Console. That&#8217;s it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">New pages take a long time to appear in search, and you don&#8217;t even know whether your site has a sitemap.xml or what is in it? Below I show how to check that and fix it. One caveat up front: for Google, a sitemap is only a hint. It does not guarantee indexing or <a href=\"https:\/\/www.web-systems.pl\/en\/professional-website-positioning\/\">higher search rankings<\/a>.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_86 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.web-systems.pl\/en\/xml-sitemap-what-to-include-how-to-submit\/#What_is_an_XML_sitemap_and_when_does_it_really_help\" >What is an XML sitemap and when does it really help?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.web-systems.pl\/en\/xml-sitemap-what-to-include-how-to-submit\/#What_to_put_in_sitemapxml_and_what_to_throw_out\" >What to put in sitemap.xml and what to throw out<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.web-systems.pl\/en\/xml-sitemap-what-to-include-how-to-submit\/#File_limits_and_the_sitemap_index_for_a_larger_site\" >File limits and the sitemap index for a larger site<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.web-systems.pl\/en\/xml-sitemap-what-to-include-how-to-submit\/#The_sitemap_in_WordPress_where_to_look_for_it\" >The sitemap in WordPress: where to look for it<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.web-systems.pl\/en\/xml-sitemap-what-to-include-how-to-submit\/#How_to_submit_an_XML_sitemap_to_Google_step_by_step\" >How to submit an XML sitemap to Google step by step<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.web-systems.pl\/en\/xml-sitemap-what-to-include-how-to-submit\/#The_sitemap_is_there_but_new_pages_are_still_not_in_Google_-_what_to_check\" >The sitemap is there, but new pages are still not in Google - what to check<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.web-systems.pl\/en\/xml-sitemap-what-to-include-how-to-submit\/#Frequently_asked_questions\" >Frequently asked questions<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.web-systems.pl\/en\/xml-sitemap-what-to-include-how-to-submit\/#Does_a_small_company_website_need_an_XML_sitemap\" >Does a small company website need an XML sitemap?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.web-systems.pl\/en\/xml-sitemap-what-to-include-how-to-submit\/#Does_a_sitemap_guarantee_indexing\" >Does a sitemap guarantee indexing?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.web-systems.pl\/en\/xml-sitemap-what-to-include-how-to-submit\/#How_often_should_you_update_sitemapxml\" >How often should you update sitemap.xml?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_an_XML_sitemap_and_when_does_it_really_help\"><\/span>What is an XML sitemap and when does it really help?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It is a file in XML format with a list of the site&#8217;s URLs. You can add extra information next to each URL, such as the date of the last change. Google also accepts sitemaps as RSS, mRSS, Atom and even a plain text file, but XML lets you do the most. According to <a href=\"https:\/\/developers.google.com\/search\/docs\/crawling-indexing\/sitemaps\/overview\" rel=\"nofollow noopener\" target=\"_blank\">Google&#8217;s introduction to sitemaps<\/a>, a sitemap is useful mainly on large or frequently changed sites, in stores with lots of products, on sites with many images and videos, and on sites shown in Google News.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A sitemap complements internal linking. It does not replace it. If no link from the rest of the site leads to a page, that page still sends a weak signal, even if it is listed in the file. The crawler will find the URL more easily, sure. But what gets into the index is decided by Google, not by you.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_to_put_in_sitemapxml_and_what_to_throw_out\"><\/span>What to put in sitemap.xml and what to throw out<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The rule is simple: only the URLs you want to see in search results go into the sitemap. In practice that means:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>canonical URLs<\/strong>, meaning the main versions of pages, not their copies,<\/li>\n<li>pages that return a 200 status code (in other words, working ones),<\/li>\n<li>pages meant for the index, without a noindex tag,<\/li>\n<li>one version of the protocol and domain, e.g. only https and only with www.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">What goes out? Redirects, 404 pages, URLs with noindex and duplicates that differ only in their parameters. In a store these are most often filter combinations (a topic for a separate conversation, more in the article on how <a href=\"https:\/\/www.web-systems.pl\/en\/faceted-navigation-store-filters-seo\/\">store filters and indexing<\/a> affect each other).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The lastmod tag says when a page last changed. According to <a href=\"https:\/\/developers.google.com\/search\/docs\/crawling-indexing\/sitemaps\/build-sitemap\" rel=\"nofollow noopener\" target=\"_blank\">Google&#8217;s documentation on building sitemaps<\/a>, the search engine takes it into account only when the value is consistently and verifiably accurate. So no, don&#8217;t set today&#8217;s date on every URL. Google will catch that. The same documentation says that priority and changefreq are ignored, so they are not worth your time. XML extensions, on the other hand, let you describe images, videos, news and language versions. Do you have a site in several languages? You will find <a href=\"https:\/\/www.web-systems.pl\/en\/hreflang-multilingual-website-language-versions\/\">hreflang in the sitemap<\/a> useful.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"File_limits_and_the_sitemap_index_for_a_larger_site\"><\/span>File limits and the sitemap index for a larger site<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A single sitemap file has a limit on its size and on the number of URLs. The current values are in the Google documentation linked above. The site doesn&#8217;t fit? You split the sitemap into several files and create a sitemap index file that points to each of them. Then you submit only the index.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In my opinion it is best to split by content type: posts, pages, products and categories separately. When the report shows errors, you know right away which part of the site they concern. Maintaining a sitemap by hand on a large, frequently changed site is basically asking for trouble. Let the CMS or a plugin generate it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_sitemap_in_WordPress_where_to_look_for_it\"><\/span>The sitemap in WordPress: where to look for it<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress creates a sitemap on its own at \/wp-sitemap.xml. SEO plugins usually replace it with their own. Here is how it looks on our side: web-systems.pl has a sitemap generated by Rank Math at \/sitemap_index.xml, and \/wp-sitemap.xml redirects to it permanently (as of September 2026).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On your own site, type \/sitemap_index.xml, \/sitemap.xml and \/wp-sitemap.xml in the browser after the domain name, one after another. Then look into the settings of your SEO plugin. Found the file? Then go through what is in it. Technical pages, empty tags, attachment pages and URLs with noindex should not be there.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_submit_an_XML_sitemap_to_Google_step_by_step\"><\/span>How to submit an XML sitemap to Google step by step<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There are two ways: the robots.txt file and Google Search Console. Ideally use both. Four steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Work out the full URL of the sitemap or sitemap index, including https.<\/li>\n<li>In the robots.txt file in the root directory of the domain, add a line in the form <em>Sitemap: https:\/\/example.com\/sitemap_index.xml<\/em>.<\/li>\n<li>In Google Search Console, open the Sitemaps report, paste the URL and confirm.<\/li>\n<li>Check the processing status and the number of discovered URLs.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The report shows errors? Search Console has its own troubleshooting guide for sitemaps. Oh, and with several domains, each site points to its own sitemap in its own robots.txt, even if all the files sit on the same server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_sitemap_is_there_but_new_pages_are_still_not_in_Google_-_what_to_check\"><\/span>The sitemap is there, but new pages are still not in Google - what to check<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A sitemap speeds up the discovery of a URL. Nothing more. Indexing of new pages also depends on content quality, internal links and on <a href=\"https:\/\/www.web-systems.pl\/en\/seo-audits\/\">nothing technically blocking the crawler<\/a>. The most common culprits:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>a noindex tag or a block in robots.txt,<\/li>\n<li>a canonical URL pointing to a different page,<\/li>\n<li>an orphan page, with no link from the site at all,<\/li>\n<li>content that duplicates a page that already exists.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Did you change your URLs? Then you need an up-to-date sitemap and a well-thought-out <a href=\"https:\/\/www.web-systems.pl\/en\/website-redesign-without-losing-traffic-redirect-plan\/\">redirect plan for a redesign<\/a>. If the cause is not visible to the naked eye, a technical SEO audit of the site will help, and further work on visibility is handled by SEO for a company website.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A good XML sitemap? A clean file with nothing but canonical URLs, an honest lastmod, submission in robots.txt and Search Console, and regular visits to the report. Nothing more. Start by checking what is in your file today.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Frequently_asked_questions\"><\/span>Frequently asked questions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-1790340271661-0\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><span class=\"ez-toc-section\" id=\"Does_a_small_company_website_need_an_XML_sitemap\"><\/span>Does a small company website need an XML sitemap?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>With a dozen or so well-linked pages, Google will usually find them even without a sitemap. But the file costs nothing, and in WordPress it is created on its own anyway. Just check that it has no unnecessary URLs in it, and submit it.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1790340271661-1\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><span class=\"ez-toc-section\" id=\"Does_a_sitemap_guarantee_indexing\"><\/span>Does a sitemap guarantee indexing?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>No. It is a hint for Google, nothing more. Whether a page gets into the index depends on its quality and on whether the crawler can access it. A sitemap only helps find the URL faster.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1790340271661-2\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><span class=\"ez-toc-section\" id=\"How_often_should_you_update_sitemapxml\"><\/span>How often should you update sitemap.xml?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>With every content change, ideally automatically through the CMS or a plugin. If the sitemap URL does not change, you do not need to resubmit it in Search Console after every update.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>An XML sitemap is simply a file listing the URLs you want to show Google. Only canonical, working pages go into it. Then you submit it in the robots.txt file and in Google Search Console. That&#8217;s it. New pages take a long time to appear in search, and you don&#8217;t even know whether your site [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":30270,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[832,822],"tags":[2160,1081,2162,1246,2286],"class_list":["post-30290","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guides","category-seo-sem-en","tag-google-search-console-x","tag-how-to","tag-indexing","tag-seo-en","tag-xml-sitemap"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/posts\/30290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/comments?post=30290"}],"version-history":[{"count":3,"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/posts\/30290\/revisions"}],"predecessor-version":[{"id":30314,"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/posts\/30290\/revisions\/30314"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/media\/30270"}],"wp:attachment":[{"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/media?parent=30290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/categories?post=30290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/tags?post=30290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}