What an XML sitemap does

An XML sitemap is a list of all the pages on your website, written for search engines. It helps them find pages that are barely linked and tells them when something changed.

How it works

Search engines find pages mainly by following links. Anything buried deep in a site or not linked at all is discovered late or never. A sitemap saves them the search: an XML file that lists every page by its address.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.example.com/</loc>
    <lastmod>2026-09-30</lastmod>
  </url>
  <url>
    <loc>https://www.example.com/services</loc>
  </url>
</urlset>

Large sites split the sitemap and bring the parts together in a sitemap index (<sitemapindex>). A single sitemap may hold at most 50,000 addresses and be no larger than 50 MB uncompressed.

bytereport looks for the sitemap first through the Sitemap: line in robots.txt, otherwise at /sitemap.xml. It checks that it answers with status 200, is valid sitemap XML (urlset or sitemapindex) and names at least one entry.

What matters

  • Real pages only. The sitemap should list addresses that answer with status 200, may be indexed and point to themselves as canonical. Redirects, error pages and noindex pages water it down.
  • Full addresses. Every <loc> holds the complete URL in the spelling of your main address; see What host variants are.
  • An honest lastmod. Google uses the change date when it is accurate. It ignores the priority and changefreq fields.
  • Keep it current. A sitemap that misses new pages or still lists deleted ones is of little use. Ideally the system generates it automatically.

How to set it up

Most CMSs generate a sitemap themselves: WordPress has served one at /wp-sitemap.xml since version 5.5, and SEO plugins often replace it with their own. Shop systems and site builders have a similar feature. Then name the address in robots.txt:

Sitemap: https://www.example.com/sitemap.xml

Also submit it in Google Search Console and Bing Webmaster Tools. There you can see how many of the listed pages are actually in the index.

More on Crawlability

Check your website now

The SEO check shows how search engines see your page.

Check website