The six sheets › Sheet II

Sheet II of VI

XML sitemaps: what they do, and what they don’t

A sitemap is a file that lists the pages and files on your site that you think matter, with details such as when each was last updated, so search engines can crawl the site more efficiently. It helps Google discover URLs, but it doesn’t guarantee that everything in it will be crawled or indexed; Google calls submitting one “merely a hint”.

General information from Google’s own documentation, not advice for your particular site. Google’s Search Central documentation is the place to check before you change anything, and it is updated over time.

The State Library of South Australia holds an 1838 plan of the city of Adelaide “with acre allotments numbered, and a reference to the names of the original purchasers”, and anyone can still search its collection by acre number. A sitemap is that kind of register for a website: not the streets themselves, but a numbered list of every lot you want found.

Do you need one?

Google’s answer depends on the shape of the site. If pages are properly linked, so that everything important can be reached through menus or links, Google can usually discover most of a site without help.

You might need a sitemap if

  • the site is large, which makes it harder to be sure every page is linked from at least one other;
  • the site is new and few other sites link to it, so Googlebot has few paths in;
  • it has a lot of video or images, or appears in Google News.

You might not if

  • the site is “small”, which Google puts at about 500 pages or fewer that you want in search results;
  • every important page can be reached by following links from the home page;
  • you don’t need media files or news pages to show in results.

Google adds that in most cases a site will benefit from having a sitemap anyway, and that a CMS such as WordPress, Wix or Blogger has likely made one available already.

The three formats

Google supports the formats in the sitemaps protocol and says it has no preference between them.

Sitemap formats Google accepts
FormatWhat it can carryGoogle’s note
XML sitemapURLs plus extra detail about images, video, news and localised versions of pagesThe most versatile; can be cumbersome and complex to maintain on large sites or where URLs change often.
RSS, mRSS or Atom 1.0 feedPages, and video details through mRSS; not images or newsOften the easiest, because most CMSes generate feeds; a feed only covers recent URLs.
Text fileOne URL per line, HTML and other indexable text pages onlyThe simplest; put nothing but URLs in it, in a file ending .txt.

A small sitemap, annotated

Here is a two-page XML sitemap for an invented site. The notes beside it come from Google’s build guide.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.example.com/plants/natives/kangaroo-paw</loc>
    <lastmod>2026-09-14</lastmod>
  </url>
  <url>
    <loc>https://www.example.com/guides/planting-in-clay</loc>
    <lastmod>2026-08-02</lastmod>
  </url>
</urlset>
  1. a The file must be UTF-8 encoded.
  2. b Use full, absolute URLs. Google will try to crawl each URL exactly as listed, so /mypage.html on its own is wrong.
  3. c List the canonical URL: if the same content is reachable at several addresses, include only the one you prefer.
  4. d <lastmod> is used only if it is consistently and verifiably accurate. It should reflect a significant update, such as to the main content, structured data or links, and not a new copyright year.
  5. e There is no <priority> or <changefreq> here on purpose: Google ignores both.
  6. f Values must be entity-escaped, as in any XML file.

The dates and addresses above are invented for the example. The order of URLs in the file doesn’t matter to Google.

Limits, and what to do at the edge

Size and placement rules, as at October 2026
RuleWhat Google’s documentation says
Size of one sitemap50MB uncompressed or 50,000 URLs, in every format. Above that, split it into several.
Where it livesAnywhere on the site, but unless submitted through Search Console it only affects descendants of its parent directory; Google recommends the site root.
Sitemap index fileLists several sitemaps so you can submit them at once; up to 50,000 <loc> tags.
Where indexed sitemaps liveOn the same site as the index, in the same directory or deeper, unless you have set up cross-site submission.
Index files per siteUp to 500 in a Search Console account.

Telling Google where it is

There are a few ways to make a sitemap available, and none of them guarantees it will be used.

  • Search Console’s Sitemaps report. Submit it there and you can see when Googlebot accessed it and any processing errors.
  • The Search Console API, to submit programmatically.
  • A line in robots.txt, such as Sitemap: https://www.example.com/sitemap.xml. Google will find it next time it crawls the robots.txt file, and there’s no limit on how many sitemap lines you include. The URL must be fully qualified; Google doesn’t assume or check the http, https, www or non-www alternatives.
  • WebSub, if you use an RSS or Atom feed, to broadcast changes.

What a sitemap does for canonical URLs

Every page listed in a sitemap is suggested as a canonical. Google treats sitemap inclusion as a weak signal, weaker than a redirect or a rel="canonical" link, though the signals stack when they agree. It also warns against contradicting yourself: don’t name one URL as canonical in a sitemap and a different one for the same page with rel="canonical". More on that in the sheet on canonical URLs.

During a site move

Google’s site-move guide suggests keeping two sitemaps: one with the old URLs and one with the new. Over time, the count of indexed URLs in the old sitemap should fall towards zero as the new one rises, and warnings about the old URLs redirecting are expected. The sheet on migrations and redirects covers the rest.

What a sitemap won’t do

  • It won’t force a page into the index; it is a hint.
  • It won’t keep anything out. Leaving a URL off the sitemap doesn’t hide it; that takes noindex or a password, covered in the robots.txt sheet.
  • It won’t replace links. Google still discovers most pages by following links from pages it has crawled.