Skip to content
SEOuchAudit my site
Menu

XML sitemap

Definition: An XML sitemap is a file that lists the URLs on a site you want search engines to discover, optionally with the date each page last changed, to help crawlers find new and updated content.

Also called: sitemap.xml, sitemap index

Updated

A minimal example

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

Each url entry needs a loc with the full, absolute URL. lastmod is optional but useful when it is accurate.

What Google actually uses

Google says a single sitemap file can hold up to 50,000 URLs or 50 MB uncompressed; larger sites split their URLs across several files and list them in a sitemap index. Google ignores the priority and changefreq values, and uses lastmod only when it is consistently and verifiably accurate (Build and submit a sitemap).

A sitemap is a discovery aid, not an instruction. Listing a URL does not guarantee it will be crawled or indexed.

Mistakes that weaken it

  • Listing URLs you do not want indexed: redirects, 404s, noindex pages, parameter variants and non-canonical duplicates. Every one of them sends a mixed signal.
  • Setting every lastmod to today on each build. Once Google learns the dates are unreliable, it stops trusting them.
  • Forgetting to tell anyone it exists. Reference it in robots.txt with a Sitemap: line and submit it in Search Console.
  • Relying on it to rescue orphan pages. A page that appears only in the sitemap can be discovered, but internal links still do most of the work of showing what matters.

The sitemap checker validates the XML, counts URLs and flags entries that redirect or return errors.