A sitemap that lies is worse than no sitemap
A sitemap is not a list of every URL that exists. It is a claim: these are the pages worth indexing, and here is when they last changed.
Treated as a claim, most sitemaps are dishonest — and Google adjusts how much attention it pays accordingly.
The four common lies
URLs that redirect. If a sitemap lists a URL that 301s elsewhere, the sitemap is telling Google to visit an address you have already decided is wrong.
URLs that 404. Dead entries left behind by a CMS that adds on publish and never removes on delete.
URLs that are noindexed. A direct contradiction: index this, do not index this.
lastmod set to today, on everything. The single most common one, usually because the sitemap is generated dynamically with now(). Its only purpose is to tell Google what changed. If everything changed today, nothing did, and the field is discarded.
Why it matters more than it sounds
Google uses the sitemap to prioritise crawling, particularly for large or new sites. A sitemap that is accurate gets used. One that is full of noise gets used less, because it has proven unreliable.
You do not get an error for this. You get a gradual, unattributable reduction in how quickly new pages are discovered.
What a good sitemap looks like
- Only URLs that return 200, are canonical to themselves, and are indexable.
lastmodreflecting actual content change, or omitted. Omitted is better than wrong.- Split into multiple sitemaps by section, with an index, once you pass a few thousand URLs — mostly because it makes the coverage report legible by section.
- Declared in
robots.txt, which is how Google finds it without you submitting anything.
The check worth automating
Take the sitemap, request every URL, and count how many return something other than 200. Then check that every 200 is canonical to itself.
Run it in CI on the production build. It catches the CMS that keeps deleted pages, the migration that changed a URL pattern, and the staging canonical, all with one script and no judgement calls.