A sitemap is a discovery hint, not a substitute for site architecture
An XML sitemap should list the URLs you want search engines to consider as canonical public pages. Google calls sitemaps a way to tell it about pages that might otherwise be missed; it does not guarantee crawling or indexing. Read the Google sitemap overview alongside the Sitemaps protocol before treating a generated file as automatically correct.
Start your audit with a sample from every URL type: home, article, product, category, locale, and paginated listing. Each entry should resolve directly to an accessible canonical URL, return the intended status, and be allowed for crawling. Exclude redirecting URLs, obvious errors, noindex pages, session URLs, internal search results, and staging paths. The sitemap is most useful when it agrees with links and canonical signals rather than arguing with them.
Run a practical checklist
Fetch the sitemap URL from robots.txt and validate that it parses. Check that every <loc> uses the preferred HTTPS host and path form. Follow a representative set of entries without silently accepting a redirect. Compare the list with rel="canonical", page-level index directives, and the application route inventory. If your file is large, use sitemap index files and preserve protocol limits rather than producing one giant response.
Consider Acme Tools, which has both /drills/cordless-9/ and /drills/cordless-9?colour=blue. Its generator emits both, while the parameter URL canonicals to the clean product URL. That creates conflicting discovery signals. Remove the parameter form from the sitemap, retain the canonical product page, and check that internal navigation offers a crawlable route to it. The canonical URL audit explains how to assess that second signal.
Do not inflate the list
Do not add every database record simply because a generator can enumerate it. A discontinued item returning 404 belongs out; a page deliberately excluded with noindex belongs out; a redirect belongs out. Do not rely on lastmod as a content-changing clock if your CMS updates it for unrelated deploys. A sitemap can describe changes, but it cannot repair weak status handling or inaccessible links.
Use the AI search readiness checker to inspect a public site’s sitemap and raw response evidence. It reports observations, not an assertion that a URL is indexed. Recheck after migrations, hostname changes, and publishing workflow changes.
Test the generator as a release integration
A new content type should not enter the sitemap until its canonical, response status, and publication state are known. A retirement should remove its URL promptly. This small release check prevents the sitemap from becoming an unreviewed database export that conflicts with editors, routing, and crawler instructions.
FAQ
Review a representative sample after each publishing release and the entire set after a migration. Small, recurring checks find errors before stale URLs become the sitemap’s normal state.
Must every page be in a sitemap?
No. Include canonical URLs you want discovered; strong internal links still matter for crawl discovery.
Can a sitemap force indexing?
No. It is a hint. Content, access, canonicalization, and crawler decisions remain separate.