Sitemap Comparison Tool
Paste two sitemap URLs and get a diff: every URL that was added, removed or kept between them. Built for before-and-after migration checks, staging-versus-production reviews and month-over-month monitoring.
Short answer
A sitemap comparison, or sitemap diff, fetches two XML sitemaps and reports three lists: URLs added (in the second but not the first), removed (in the first but not the second), and kept (in both). This tool reads up to 5,000 URLs per side, expands sitemap index files up to 30 children each, and matches URLs exactly after stripping trailing slashes. The reason to run one is simple: the URLs that silently vanish from a regenerated sitemap are the pages that quietly stop being recrawled.
What a sitemap diff catches
Almost nobody writes a sitemap by hand. The file is generated, by a CMS, a plugin or a build step, and regenerated every time the site changes. That is exactly what makes it dangerous: when the generation rules change, URLs drop out of the file with no error, no warning and no visible difference anywhere on the site. The diff between yesterday's file and today's is the only place the loss shows up.
The usual ways URLs go missing:
- A migration maps most URLs to new paths and quietly loses a batch that matched no rule
- A CMS or plugin update changes what the generator includes, and a post type or taxonomy falls out
- A template or configuration change excludes a whole section nobody meant to exclude
- Pages get unpublished or noindexed in bulk during a cleanup that swept up too much
- A build step starts failing for one content source and ships the sitemap without it
Of the three lists the tool produces, the removed list is the one that costs money. An added URL is a page asking to be crawled. A removed URL is a page that was earning impressions last month and has now lost its recrawl signal, and if it was dropped by accident, nobody is going to notice until the traffic graph does. Running a diff takes thirty seconds; reconstructing what a migration lost three months later takes considerably longer.
The three lists, and what to do with each
A diff is only useful if you know what each list is telling you. The same list can be good news or a serious problem depending on what changed between the two files, so read them against what you expected to happen.
| List | What it means | When it is expected | When it is a problem | What to do |
|---|---|---|---|---|
| Added | URLs in B that were not in A | After publishing new content or opening a new section | A sudden flood after a plugin update usually means junk URLs entered the file | Skim for patterns: tag pages, parameters and archives should not be there |
| Removed | URLs in A that are gone from B | After an intentional cleanup, with 301s in place | Removed and not redirected is the classic migration leak | Check each one with the redirect checker: it should 301 to a kept URL or be intentionally gone |
| Kept | URLs present in both files | The overwhelming majority of most diffs | A small kept list between two versions of the same site means the comparison matched almost nothing | Verify the two sides use the same host and URL style before trusting the numbers |
The removed list deserves the closest read. Every URL on it should be one of two things: a page you meant to retire, or a page that now redirects to something in the kept list. Run the doubtful ones through the redirect checker and anything returning a 404, a 302 or a long chain goes on the fix list.
How to audit a migration with a sitemap diff
A migration audit with a sitemap diff is five steps, and the first one happens before the migration. The whole method rests on having a copy of the old file, because once the new site deploys, the old sitemap is gone.
- 01
Save a copy of the old sitemap before you migrate
Download the sitemap while the old site is still live and keep the file somewhere safe. If the migration already happened, pull an archived copy from the Wayback Machine: most sitemaps of established sites are captured there.
- 02
Run the diff, old sitemap as side A, new as side B
Paste the old sitemap URL as side A and the new one as side B. The tool expands both, including index files, and reports every URL that was added, removed or kept.
- 03
Go through the removed list URL by URL
Every removed URL must be one of two things: intentionally gone, or redirected with a 301 to a URL in the kept list. Anything that is neither is a page that just lost its recrawl signal by accident.
- 04
Trace the removed URLs through the redirect checker
Run each removed URL that is supposed to redirect through the redirect checker and confirm a single 301 hop landing on a kept URL. A 404, a 302 or a chain of hops is a migration leak.
- 05
Recheck the new sitemap end to end
Once the removed list is accounted for, run the new sitemap through the sitemap checker to confirm the file itself is valid, reachable and free of entries that redirect or error.
The rule that makes the audit binary
Every removed URL must either be intentionally gone or 301 to a kept URL. There is no third acceptable state. A removed URL that returns 200 is a live page you stopped declaring; a removed URL that returns 404 without a redirect is a dead end for every backlink and bookmark pointing at it. When the removed list is fully accounted for, finish by running the new file through the sitemap checker.
Where the second sitemap comes from
The tool needs two URLs, and the interesting question is where the second one comes from, because the old version of a generated file does not exist anywhere on the live site. In practice it comes from one of four places.
- An archived copy: the Wayback Machine captures sitemap files, so a pre-migration snapshot is often one search away
- A staging URL: compare what is about to deploy against what is live, before the deploy rather than after
- A competitor's sitemap saved last month: the diff against today's version is a clean month-over-month record of their publishing velocity
- The old domain during a rebrand: while both sitemaps are still live, the diff shows exactly which URLs made the crossing
If you do not yet know where a site's sitemap lives, the sitemap finder locates it from robots.txt and the common paths, and you can also paste a bare domain into either side here and the tool will discover it for you. And when what you actually want is the raw URL list from one file rather than a diff of two, the sitemap URL extractor pulls it out as CSV in one step.
One habit worth building: every time you download a sitemap for any reason, keep the file. A dated folder of sitemap snapshots costs nothing and turns every future "when did that section disappear" question into a thirty-second diff instead of an archaeology project.
What this tool does
Two-sitemap diff
Added, removed and kept, computed from full URL sets on both sides
Index expansion
Sitemap indexes are followed up to 30 child files per side
Three exportable lists
Added, removed and kept, each viewable and downloadable
5,000 URLs per side
With an honest note when either sitemap holds more
Trailing-slash normalization
/about/ and /about count as the same page; query strings do not
Gzip support
Compressed .xml.gz sitemaps are decompressed automatically
CSV export
One file with every added and removed URL labelled by change
Domain auto-discovery
Paste a bare domain on either side and the sitemap is found via robots.txt
The diff is only as honest as its inputs
Frequently asked questions
How do I compare two sitemaps?
Paste the first sitemap URL as side A, the second as side B, and press Compare. The tool fetches both files, expands any sitemap indexes into their full URL lists, and reports three sets: URLs added in B, URLs removed from A, and URLs present in both. Each list can be downloaded as CSV or TXT.
Why did URLs disappear from my sitemap?
Usually because the sitemap is generated, not written. A CMS upgrade, a plugin update, a changed template or a migration can all change the generation rules, and any page that no longer matches them silently drops out of the file. Deleting or unpublishing pages, changing slugs and excluding categories have the same effect. The diff shows you exactly which URLs went.
Is a URL that was removed from the sitemap deindexed?
Not immediately. Removing a URL from the sitemap does not remove it from Google's index; it removes the signal that asks for the page to be recrawled. The page fades rather than vanishes: it gets crawled less often, freshness signals decay, and over time it can slip in rankings or drop out. If the page still exists and matters, put it back in the sitemap.
How do I get my old sitemap after the fact?
The Wayback Machine at web.archive.org captures sitemap files for many sites, so try web.archive.org/web/*/example.com/sitemap.xml and pick a snapshot from before the change. Other options are a database or file backup from before the migration, a staging environment still running the old code, or the copy your SEO platform crawled last month.
Does this tool handle sitemap indexes?
Yes. If either side is a sitemap index, the tool follows up to 30 child sitemaps per side and merges their URLs into one list before diffing, reading up to 5,000 URLs per side. Gzipped sitemaps are supported too.
How are URLs matched between the two sitemaps?
Exactly, after one normalization: a trailing slash on the path is stripped, so /about/ and /about count as the same page. Everything else is compared as-is, including query strings, so /page?tab=reviews and /page are treated as different URLs, which is what a sitemap means when it lists them separately.
Can I compare a staging sitemap against production?
Yes, both URLs are fetched independently, so the hosts can differ. Be aware the tool compares full URLs, so if staging lives on a different domain every URL will differ and the diff becomes meaningless. Compare same-host copies where you can: for cross-host checks, download both files and rewrite one host onto the other before diffing.
What does a big added list mean?
It depends on what changed. After a content push it is good news: those pages are now being declared for crawling. After a plugin update, a sudden flood of added URLs often means the generator started including things it should not, like paginated archives, tag pages or parameter variants. Skim the added list for patterns before celebrating the growth.
Can I compare a competitor's sitemap over time?
Yes, sitemaps are public files. Save a copy of a competitor's sitemap URL this month, run the diff against the live version next month, and the added list is a clean record of what they published in between. It is one of the simplest content-velocity signals available.
Why does my sitemap count differ from Search Console's indexed count?
Because they measure different things. A sitemap is what you declare; the index is what Google chose to keep. Google routinely indexes URLs that are not in the sitemap and skips URLs that are, so the two numbers rarely match. A large gap in either direction is worth investigating, but a gap itself is normal.
What happens if one sitemap times out?
The comparison fails with an error rather than reporting a half-empty diff as if it were real. Each side gets its own fetch budget, and if a child sitemap inside an index cannot be read, the result carries a note saying URLs may be missing so you never mistake a partial diff for a complete one.
Is 5,000 URLs per side enough for my site?
For most sites, yes: the median sitemap is far smaller than that. If either side holds more, the tool reads the first 5,000 URLs and says so in a note, which still catches wholesale section losses because generated sitemaps tend to be ordered consistently. For a full diff of a six-figure URL set you want a crawler-backed audit rather than a free browser tool.
Other sitemap tools
XML Sitemap Generator
Crawl any website and generate a valid XML sitemap you can download and submit. No signup, no software to install.
Use toolXML Sitemap Validator
Test any XML sitemap against the sitemaps.org protocol. Catches namespace errors, bad lastmod dates, size limits, and cross-domain URLs.
Use toolSitemap Checker
Check a sitemap end to end: the file against the sitemaps.org protocol, then a live check of the URLs inside it. One pass, one health score.
Use toolSitemap Crawler
Crawl every URL your sitemap declares and find the dead links, redirects, noindex pages, and canonical conflicts hiding inside it.
Use toolSitemap URL Extractor
Pull every URL out of a sitemap or sitemap index and download the list as CSV, TXT, or JSON. Handles nested indexes and gzipped files.
Use toolSitemap Index Generator
Paste your sitemap URLs and get a valid sitemap index file back, with optional lastmod dates. For sites past the 50,000 URL limit that split their sitemaps.
Use toolSitemap Finder
Find where any website hides its sitemap. Checks robots.txt directives plus nine common paths, including WordPress and gzipped variants.
Use toolVisual Sitemap Generator
Turn any site into a visual tree of its structure. See how deep your pages sit and which sections carry the most URLs.
Use toolSee what each removed URL was earning before it slipped out
A diff shows what changed in what you declare. CrawlRaven joins the crawl to Search Console and GA4, so every removed URL comes with the clicks, impressions and sessions it was earning, and the fix list sorts itself by what the loss actually costs.