XML sitemap

An XML sitemap is a file listing the URLs on a site that its owner wants search engines to know about, optionally with last-modified dates. It is a discovery hint, not an instruction: listing a URL does not guarantee crawling, and omitting one does not prevent it.

A sitemap answers one question for a search engine: which URLs does this site consider worth knowing about? It is most valuable on large sites, on new sites with few inbound links, and on sites where internal linking leaves some pages hard to reach.

Practical rules that hold across engines:

  • One sitemap holds up to 50,000 URLs or 50MB uncompressed. Beyond that, split it and use a sitemap index file.
  • List only canonical, indexable URLs that return 200. Listing redirects, 404s or noindex pages sends a contradictory signal.
  • lastmod is used, so it must be accurate. A file where every URL claims to have changed today is a file that gets ignored.
  • Reference the sitemap from robots.txt with an absolute Sitemap: line, and submit it in Search Console and Bing Webmaster Tools.

What a sitemap cannot do is make a page rank, force a crawl, or fix a page that is blocked, orphaned in every other respect, or judged duplicate.