Skip to content

XML sitemap: what it is, when you need one and what search engines actually use

Author: Matteo Pellegrini

A sitemap is a file in which you list the URLs on your site that you want search engines to find, with a small amount of information about each one, such as the date it was last modified. Google reads it to discover pages its crawlers might not reach by following links.

The thing to check before installing any plugin is whether you need one at all. If the site has fewer than 500 useful pages and each of them can be reached from the home page, Google Search Central's documentation says you might not need one. Above that threshold, on a new site nobody links to, or on a catalogue with lots of images and videos, the sitemap is the most direct way to declare that those URLs exist.

What a sitemap contains, and what search engines actually use

In the XML format the only required element for each entry is <loc>, the absolute URL of the page. Everything else is optional, and that is where most of the outdated advice sits. On 26 September 2026 I looked at the first page of Google UK for "sitemap" (4,400 searches a month, DataForSEO): the AI Overview at the top still says XML sitemaps tell crawlers about "update frequencies, and page importance", and one of the UK agency pages on the same page claims that regular sitemap submissions help a site rank.

On the page about how to build and submit a sitemap, Google's position takes one line: "Google ignores <priority> and <changefreq> values." The reasoning comes from a post by Gary Illyes dated 26 June 2023 on the Search Central blog: changefreq overlaps conceptually with lastmod, while priority is "a very subjective field" that, in Google's internal studies, did not reflect the real priority of pages.

ElementWhat the protocol saysGoogleBing
<loc>Absolute URL of the page, fewer than 2,048 charactersRequiredRequired
<lastmod>Date the page was last modified, W3C Datetime formatUsed to schedule recrawls of URLs it already knows, if the dates are reliableUsed to decide whether to recheck a URL or skip it, in ISO 8601 format
<changefreq>How often the page changes, described as "a hint and not a command"IgnoredIgnored
<priority>Relative importance from 0.0 to 1.0, default value 0.5IgnoredIgnored
Sources: sitemaps.org, Sitemap protocol 0.9; Google Search Central; Bing Webmaster Blog, July 2025.

On lastmod, Illyes is explicit about what happens if you get it wrong: "if your page changed 7 years ago, but you're telling us in the lastmod element that it changed yesterday, eventually we're not going to believe you anymore when it comes to the last modified date of your pages". By last modification Google means a significant one: changed text in the sidebar or footer does not call for a new value, a rewritten main text or modified structured data does. You are also allowed to leave out lastmod on pages for which you have no reliable date.

When a sitemap helps and when it changes nothing

Google publishes criteria on both sides. You need one if the site is large and you cannot be sure every page is linked from another page, if it is new and no external site links to it, if it has a lot of video and images, or if it appears in Google News. You might not need one if it has roughly 500 pages or fewer, counting only those you want in search results, if internal links reach everything from the home page, and if there are few media files you want shown in the results.

What a sitemap does not do is written in the same documentation: "submitting a sitemap is merely a hint: it doesn't guarantee that Google will download the sitemap or use the sitemap for crawling URLs on the site." If a page is not being indexed because it is almost identical to another one, or because it does not have enough content of its own, listing it in an XML file changes nothing. A sitemap solves a discovery problem, not an evaluation problem, and the rest of the access checks belong to technical SEO.

File limits, and how to split a large sitemap

The protocol's numbers have not changed since 2005 and apply to every format. Beyond them the sitemap is split into several files and an index file is added, which is a sitemap of sitemaps.

LimitValueSource
URLs per sitemap file50,000Google, sitemaps.org
Uncompressed file size50 MB (52,428,800 bytes)sitemaps.org
Compressiongzip allowed, the uncompressed file must stay under 50 MBsitemaps.org
URL length in <loc>fewer than 2,048 characterssitemaps.org
Sitemaps listed in one index file50,000sitemaps.org, Bing
Index files per site you can submit in Search Console500Google
URLs covered by a single index fileup to 2.5 billionBing, July 2025
Limits set by the Sitemap 0.9 protocol and by Google's documentation on index files.

Two constraints on where the file lives are almost always missed. First, a sitemap only covers descendants of the folder it is published in, so a sitemap in /blog/ cannot declare URLs outside /blog/ unless you submit it through Search Console. That is why the site root is the recommended location. Second, the sitemaps listed in an index file must be on the same site and in the same folder as the index, or lower down.

On formats, Google accepts XML, RSS 2.0 and Atom 1.0 feeds, and a text file with one URL per line, and says it has no preference. The choice still matters: a feed only contains recent URLs, a text file cannot carry any data beyond the URLs, and Bing states that XML remains its preferred format because it is the only one that carries lastmod.

How to submit a sitemap now that the ping is gone

Two channels are left. The first is a line in the robots.txt file, in the form Sitemap: https://www.example.com/sitemap.xml. The directive is independent of the user-agent line, so its position in the file does not matter, there is no limit on the number of lines you can add, and if you have an index file declaring that is enough. The second is Google Search Console, which gives you the Sitemaps report with the discovered URLs in return.

The third channel, the HTTP request to the ping endpoint, no longer exists. Google announced it on 26 June 2023 and since then those calls return a 404. Bing had already removed anonymous sitemap submission in May 2022. If you find a guide that still tells you to "ping" your sitemap after every post, it was written before that date, and it is worth checking what else it says.

IndexNow covers the opposite case and does not replace the sitemap. It is used to notify new, changed or deleted URLs, up to 10,000 URLs per request, and its own documentation says to use sitemaps to give search engines the full inventory of the site. It is supported by Bing and by other search engines that share the protocol.

Four things that make a sitemap useless

A bad sitemap does no direct harm to rankings, but it wastes the one advantage it has, which is telling the crawler something it did not know. These are the mistakes we see most often on the company websites we audit.

  • Noindex URLs. Declaring a page important while asking for it not to be indexed is a contradiction the crawler resolves by obeying the noindex meta robots tag. The visit, though, has already been spent.
  • URLs canonicalised elsewhere. If the page names another address as its preferred version, that other address is the one that belongs in the sitemap. The check sits in the page's rel canonical tag, not in the XML file.
  • URLs that do not return 200. Old addresses left in after a migration, deleted pages that now return a 404 error, redirect chains. On a plugin-generated sitemap this happens with every redesign.
  • lastmod equal to the date the file was generated. It is the most common case and the least visible, because the file stays formally valid.

There are public numbers on the last point. In February 2023 Fabrice Canel of Microsoft published an analysis of the hosts known to Bing, a worldwide sample: 58% had at least one XML sitemap, 84% of those sitemaps contained lastmod, and in 18% of cases the value was not set correctly. The cause identified by talking to site owners was always the same: the sitemap generation date used instead of the date the content changed. When Bing sees dates that always equal today, Canel writes, it becomes suspicious of their validity and may ignore them.

Segmented sitemaps: the use most guides skip

In the section on size limits, Google adds a sentence that rarely makes it into sitemap guides: you can submit several sitemaps and several index files, and "this may be useful if you want to track the search performance of each individual sitemap in Search Console". In practice, splitting into several files is not only a way to stay under 50,000 URLs, it is a diagnostic tool.

On a site with 40,000 URLs in a single file, the Sitemaps report tells you how many addresses Google has discovered in total, and that total does not help you decide anything. If you split by page type instead, one sitemap for categories, one for product pages, one for articles, one for service pages, the comparison between submitted and indexed URLs becomes readable template by template. If the categories get through and the product pages do not, the problem is in the product page template, not the site. It is the check we start almost every audit of a large catalogue with, and it does not need any paid tool.

Useful segmentation follows the template or the section, not the alphabetical order or the creation date that plugins use by default. On WordPress the core generates /wp-sitemap.xml, Yoast SEO and Rank Math generate an index with separate files per content type, and in both cases it is worth checking what they have chosen to exclude before trusting the list.

Multilingual sitemaps, where nothing else does the job as well

Among the information a sitemap provides, Google also lists alternate language versions of a page. The xhtml:link rel="alternate" annotations can be declared in the XML file instead of in the HTML of each page, and on a site in six languages that means removing six lines of markup from every single page and keeping them in one place. The reciprocity requirement is identical to the on-page implementation, which we explained in our guide to hreflang tags. It is also the only case in which the sitemap carries information that no other channel provides more cheaply.

If the site is large, multilingual, or has just come out of a migration, this is the first file to look at, and our SEO consulting always starts by comparing what the sitemap declares with what Google's index actually contains.

One thing the industry rarely says. The sitemap is the most honest document a site produces, because it is the only place where the structure is written out in full instead of being inferred from the menus. When the list generated by the CMS and the list of pages that internal links actually reach do not match, the problem is not the XML file, it is the internal links. On almost every project the sitemap is treated as a box to tick once at launch, not as the file to reopen every quarter and compare with what the site has since become.

Sitemap FAQs

What is a sitemap for?

It tells search engines which URLs on the site exist and which you want them to find, along with the date each one was last modified. Google uses it to discover pages its crawlers might not reach by following internal links, and to decide when to come back to URLs it already knows. It is not a ranking tool: it solves a discovery problem.

How do I find a site's sitemap?

In most cases it is at /sitemap.xml or /sitemap_index.xml. On WordPress, if no SEO plugin is active, the core generates it at /wp-sitemap.xml. The most reliable method is to open the domain's robots.txt file and look for the line starting with Sitemap:, because that is where the real location should be declared.

How do I submit a sitemap to Google?

There are two ways. Add a line to the robots.txt file in the form Sitemap: https://www.example.com/sitemap.xml, which Google reads the next time it crawls the file, or submit it from the Sitemaps report in Google Search Console, which shows the discovered URLs in return. The old ping endpoint via HTTP request was switched off by Google in 2023 and now returns a 404 error.

How many URLs can a sitemap contain?

Up to 50,000 URLs per file, and the file cannot exceed 50 MB uncompressed, which is 52,428,800 bytes. You can compress it with gzip, but the limit applies to the uncompressed file. Beyond that, the URLs are split across several sitemaps and an index file lists them, which in turn can contain up to 50,000 sitemaps.

Does having a sitemap improve rankings?

No. It is not a ranking factor, and Google's documentation says submitting one is merely a hint that guarantees neither that the file is downloaded nor that the listed URLs are crawled. It helps new or isolated pages get discovered on large sites. On a small site with complete internal linking, the measurable benefit is close to zero.

Matteo Pellegrini

Matteo Pellegrini

I’m a Business Developer, and at Visilay I focus on developing data-driven SEO, Google Ads, and CRO strategies. I love historical museums, have been practicing Karate for as long as I can remember, and on weekends I enjoy exploring Italian villages in search of authentic local food.