usdigitalmarketingindex.com SEO
How can unexpected XML sitemap changes be detected after a CMS update?
Updated November 15, 2026
By saving a copy of the sitemap’s contents before the update, fetching it again afterward, and comparing the two as sets of URLs: which entries were added, which were removed, and which changed. A sitemap is generated by the CMS or a plugin from rules about what counts as publishable. An update can alter those rules without announcing it. A content type drops out, draft or tag pages start being listed, URLs switch from https to http, or the file stops being produced at all. None of this shows on the site’s pages. It shows only in the sitemap, so the sitemap has to be watched directly. Not every change is a fault, since sitemaps should change as content is published and retired. The comparison finds the changes, and a short set of rules decides which of them need a person’s attention.
Baseline sitemap files
Record the sitemap’s state while it is known to be good.
What to save:
| Item | Detail |
|---|---|
| The sitemap index | Its URL and the list of child sitemaps |
| Each child sitemap | Every URL entry, with its last modification value |
| Counts | Total URLs, and URLs per child sitemap |
| Counts by section | URLs grouped by path pattern: /products/, /guides/, /blog/ |
| Response details | Status code, content type, file size |
| Location | The sitemap line in robots.txt; the sitemaps submitted in Search Console |
| Date | When the baseline was taken |
Save the URL list in normalized form, one URL per line, sorted. That makes two versions directly comparable.
Take a new baseline on a schedule and before every CMS, plugin, or theme update. Keep a history, so that a slow drift can be traced back to when it began.
Know what the sitemap is supposed to contain. Write the intended rule down: which content types, which languages, which exclusions. The comparison is against the previous file. The judgment is against the rule.
Entry-level diffs
Compare at the level of individual URLs.
| Comparison | Finds |
|---|---|
| URLs in the new file and not the old | Additions |
| URLs in the old file and not the new | Removals |
| URLs in both with a changed last modification value | Updates |
| Change in total count | Scale of the change |
| Change in count per section | Where the change is |
| Change in child sitemaps listed in the index | Missing or new files |
| Change in URL form | Protocol, host, trailing slash, case, parameters |
An automated comparison rule list:
| # | Rule | Alert level |
|---|---|---|
| 1 | Sitemap or index returns a status other than 200 | Critical |
| 2 | File is empty, or not well-formed XML | Critical |
| 3 | A child sitemap listed in the baseline index is missing | Critical |
| 4 | Total URL count falls by more than a set percentage | Critical |
| 5 | Any section's count falls to zero | Critical |
| 6 | URLs appear with a different protocol or hostname than production | Critical |
| 7 | Total URL count rises by more than a set percentage | Major |
| 8 | A new path pattern appears that was never in the sitemap | Major |
| 9 | URLs with query parameters appear | Major |
| 10 | Every last modification value changed to the same date | Major |
| 11 | Priority URLs from a watchlist are absent | Critical |
| 12 | Removals exceed the number of pages known to have been unpublished | Major |
| 13 | Additions and removals within the normal daily range | None; log |
Set the percentages from the site’s own history of normal change. A news site adds many URLs a day. A brochure site adds none for weeks. A fixed threshold copied from elsewhere produces either constant alerts or silence.
Rule 10 detects a specific fault: a regeneration that stamps every entry with the time of the update. Google’s sitemap documentation says it uses the last modification value if it is consistently and verifiably accurate (Google’s guidance on building sitemaps), so a sitemap claiming that every page changed today has made the value useless.
Sample alerts:
CRITICAL sitemap-section-empty
/sitemap-products.xml: 1,840 URLs in baseline, 0 now.
First seen: after CMS update 6.4.1, 09:12 UTC.
MAJOR sitemap-new-pattern
312 URLs matching /tag/* now listed; pattern absent from baseline.
Sample: /tag/thermostats/, /tag/boilers/, /tag/offers/
CRITICAL sitemap-wrong-host
2,407 URLs now use http://staging.example.com/
Baseline: https://www.example.com/
MAJOR sitemap-lastmod-reset
2,395 of 2,407 entries have lastmod 2026-11-11.
Canonical/status sanity checks
A diff shows what changed in the file. A second check asks whether what is listed should be listed.
For URLs added since the baseline, and for a rotating sample of the rest, request each and test:
| Check | Pass condition |
|---|---|
| HTTP status | 200 |
| Redirect | None |
| Canonical tag | Names the same URL as the sitemap entry |
| Meta robots and X-Robots-Tag | No <!–INLINECODE0–> |
| robots.txt | Not blocked |
| Content | A real page, not an empty template or error message with status 200 |
| Protocol and host | The production canonical form |
A sitemap should list canonical, indexable URLs that return 200. Entries that redirect, error, carry noindex, or canonicalize elsewhere send conflicting signals.
For URLs removed since the baseline, request each:
| Result | Meaning |
|---|---|
| 404 or 410 | The page was unpublished; removal is correct |
| 301 | The page moved; check that the new URL is in the sitemap |
| 200, indexable | The page is live and was dropped from the sitemap: a fault |
| 200, <!–INLINECODE2–> | The page was deliberately excluded; confirm that was intended |
The third row is the one that matters. Live, indexable pages missing from the sitemap after an update mean the generation rules changed.
Availability is part of the check. A sitemap whose URL returns an error, or which is now blocked by robots.txt, is a failure whatever its last known contents were.
Alert triage
When an alert fires:
- Confirm it by fetching the sitemap manually.
- Check the change log: was content published, removed, or restructured on purpose?
- Check what was updated: CMS core, the sitemap or SEO plugin, the theme, or settings.
- Classify.
| Classification | Examples | Action |
|---|---|---|
| Expected | New articles added; discontinued products removed; a planned section launch | Log; update the baseline |
| Configuration change | Plugin update reset which content types are included | Restore the setting; regenerate; verify |
| Defect | Wrong host, malformed XML, missing child sitemap | Fix or roll back the update |
| Side effect of another change | Pages lost from the sitemap because they gained <!–INLINECODE3–> or began redirecting | Trace to that change; the sitemap is the messenger |
5. After the fix, fetch again, rerun the rules, and take a fresh baseline.
- Check Search Console’s Sitemaps report: last read date, status, and discovered URL count.
The fourth classification is worth remembering. A well-built sitemap excludes pages that are not indexable. When pages vanish from it, the cause can be upstream: a directive or a redirect introduced by the same update. The sitemap diff is then an early warning of a larger problem.
What a sitemap change does and does not do: removing a URL from a sitemap does not remove it from the index, and adding one does not get it indexed. A sitemap is a list of URLs offered for crawling. The reason to monitor it is that it is a compact, machine-readable statement of what the CMS believes the site contains, and a change in that belief is worth knowing about the day it happens.
Keep the monitor running between updates too. Scheduled jobs, plugin auto-updates, and settings changes alter sitemaps without a release.
Crawl access is governed by a different file, and unintended changes to it need their own check, described in the guide to how a release pipeline can detect robots.txt changes that unexpectedly block site sections.
The rule: keep a baseline of the sitemap’s URLs, compare after every update, test added and removed URLs for status and indexability, and judge each difference against what the sitemap is meant to contain.
Add your comment to this answer