XML Sitemap

An XML sitemap is a file listing the URLs on a website that the owner wants search engines to crawl and index. It helps Google find pages it might otherwise miss, which matters most on large sites, new sites, and sites with weak internal linking.

Most sitemap advice still covers tags Google doesn’t read. Google’s sitemap documentation says it ignores the priority and changefreq values, and uses lastmod only when it’s consistently and verifiably accurate. That turns lastmod into a trust test. In his analysis of the 2024 Google API leak, Mike King found Google tracks several separate dates for each page and advises keeping them consistent across structured data, page titles and XML sitemaps. A sitemap that marks every page as updated today teaches Google to ignore your dates.

Sitemap tags and what Google does with them

Tag What it says What Google does
loc The page URL Required. Uses it to find the page
lastmod When the page last changed Uses it only if it’s consistently accurate
changefreq How often the page changes Ignores it
priority How important the page is Ignores it

Set lastmod to the date of the last significant change to the page, not the date the sitemap was generated. Google’s guidance on helpful content lists changing page dates without substantially changing the content as a warning sign.

What belongs in a sitemap

Only the canonical version of each page you want indexed, returning a 200 status. Leave out noindexed pages, redirecting URLs, broken pages, parameter variants and anything blocked in robots.txt. Every excluded URL that slips into the sitemap tells Google something conflicting about your site.

Size limits and splitting sitemaps

A single sitemap can hold up to 50,000 URLs or 50MB uncompressed. Larger sites split into several sitemaps listed in a sitemap index. Splitting pays off well below that limit too. Google notes that separate sitemaps let you track each one’s performance in Search Console, so a B2B site with service pages, blog posts, a glossary and case studies can see which section has the indexing problem.

Submitting your sitemap

Submit it in Search Console under Sitemaps, and add a Sitemap: line to robots.txt so every crawler can find it. The old method of pinging Google with a sitemap URL was retired in late 2023, so tools that still promise to “ping Google” do nothing.

Reading the gap between submitted and indexed

The gap between URLs you submitted and URLs Google indexed is the most useful diagnostic a sitemap gives you. Search Console’s Page indexing report breaks down why submitted pages were left out. “Discovered, currently not indexed” usually points to crawl priority or weak internal links. “Crawled, currently not indexed” usually means Google read the page and didn’t think it was worth keeping.

For a specialty paint manufacturer with more than 300 coatings, that gap showed product pages Google had found but wasn’t indexing. Fixing the indexing was the first step in the work that later lifted tracked leads 47.7% in the industry’s slowest season.

Where sitemaps don’t help

A sitemap tells Google a page exists. It doesn’t make the page worth indexing, and it doesn’t replace internal links. On a small site with a few dozen well-linked pages, the sitemap adds little that crawling wouldn’t find. I still set one up on every site, for the diagnostics in Search Console and an accurate lastmod.

Common mistakes

  • Setting lastmod to the sitemap generation date on every URL.
  • Including noindexed, redirected or broken URLs.
  • Spending time on priority and changefreq values Google ignores.
  • Treating submission as a fix for pages Google crawled and chose not to index.
  • Using one sitemap for the whole site, which hides which section has the indexing problem.

Related terms

Crawl budget · Robots.txt · Canonical tag · Internal linking · Redirect chain

Let's build a AI SEO search strategy that actually delivers.

Book a consult to see where your current search visibility stands, on Google and across AI search, and what is actually possible from here.