In-depth practical guides

Compare two sitemaps before publishing or migrating

Find added or removed URLs, duplicates and lastmod or hreflang changes, then check their consequences on the pages.

Updated :

Interface checks on a computer, tablet and phone.

Which URLs and metadata actually changed between two versions?

A sitemap describes URLs proposed for crawling. Comparing files checks a publication scope, but does not measure indexing or rankings. Separate the change observed in the file from the checks still needed on the pages.

  1. Freeze comparable versions

    Keep before and after files, their origin and coverage. Compare the same type: an index describes child sitemaps; a urlset describes pages. Identify partial extracts.

  2. Compare addresses without merging them

    Compare exact loc values after XML decoding. Keep differences in scheme, host, case, trailing slash and parameters. Similar addresses suggest a migration to investigate, not a proven redirect.

  3. Review issues and metadata

    Inspect duplicates and invalid loc values before interpreting totals. For lastmod, identify a significant content change: regeneration alone does not justify a new date. Compare declared hreflang destinations, then check reciprocity on the pages.

  4. Check pages and retain decisions

    Check HTTP responses, canonicals and indexing exclusions for affected URLs. Record the reason for intentional removal and an equivalent replacement if one exists. Log each anomaly and chosen action, then repeat the comparison after correction.

Compare the declarations in two sitemaps

Paste two UTF-8 XML documents of the same type: urlset or sitemapindex. Tool limits: 2 MiB UTF-8 and 2,000 entries per document. The profile accepts HTTP(S) URLs with ASCII hostnames, including punycode, without fragments or login credentials. Images and other extensions are not compared.

Load a fictional example

No address is visited, no file is created and no input is stored. With JavaScript, comparison stays in your browser; without JavaScript, this site processes the form.

Differences between usable entries

urlset

Results cover usable entries; any exclusion makes the comparison partial. Duplicates remain ambiguous. Decoded XML values are compared exactly, without normalizing URLs. The tool validates neither schemas, dates or languages, nor HTTP responses, canonicals, hreflang reciprocity or indexing.

Added
1
Removed
1
Metadata changed
1
Ambiguous URLs
0
Unchanged
1
Distribution of distinct URLs: the numbers and labels above provide the full reading.
Before
Entries read
3
Usable distinct URLs
3
Excluded entries
0
Extra duplicates
0
    After
    Entries read
    3
    Usable distinct URLs
    3
    Excluded entries
    0
    Extra duplicates
    0

      The first twenty findings per document are displayed; counts cover all entries read. Duplicates count extra occurrences. Metadata of an ambiguous URL is not used to conclude addition, removal or change.

      3 rows displayed out of 3 filtered differences; 100 rows per page.

      Detailed differences: declared lastmod and hreflang links
      StatusExact URLBeforeAfter
      Metadata changedhttps://example.org/lastmod: 2026-10-20lastmod: 2026-10-21
      Removedhttps://example.org/ancienlastmod: ——
      Addedhttps://example.org/nouveau—lastmod: —
      1 / 1

      Understand the six cases

      Addition, removal and date

      One URL is added, one removed, one date changes and one URL stays unchanged. The total remains three: a global count alone would hide the migration.

      Only the date changes

      The address remains; lastmod changes. Identify the content change before retaining the new date. The tool does not turn a declaration into verified editorial history.

      A language variant disappears

      The main URL remains, but its Finnish hreflang link is removed. The difference appears in metadata with no added or removed URL. The affected pages still need checking.

      Duplicate and excluded entry

      Before contains the same URL twice and a relative address. The repeated URL is ambiguous and the relative address is excluded. Correct these entries before drawing a complete conclusion.

      Only the order changes

      Entries and alternate links change order without changing values. The result remains unchanged. Parameter order within a URL is preserved, however.

      An index, not its pages

      Both child sitemap references remain; only one date changes. The page URLs inside those files remain unknown to this comparison.

      From observation to decision

      Same totals, different URLs

      In this fictional example, A to E represent five distinct absolute URLs within the same scope. Each file contains five entries and four unique URLs. Letters abbreviate the lists; these are not XML snippets for publication.

      Fictional learning case: counts and dates illustrate the method and do not describe a real assignment.

      1. 5entries in each file
      2. 4unique URLs in each file
      3. 2membership changes
      Case reading grid
      ObservationUseful checkNext action
      Before: [A, A, B, C, D]Five entries, four unique URLs; A occurs twice.Count entries and distinct URLs separately.
      After: [A, B, C, E, E]Five entries, four unique URLs; E occurs twice.Do not infer stability from the two totals.
      Retained: [A, B, C]Three URLs belong to both sets.Check metadata too; a retained address can have changed content.
      D removed; E addedOne URL disappeared and another appeared.Record why, then check relevant pages, redirects and canonicals. The file alone does not establish removal from an index.
      Repetitions: A before, E afterEach version has one extra occurrence.Fix duplicate production without hiding the replacement of D by E.
      Your decision — Does removing duplicates validate the migration?

      Explained answer

      No. The sets become [A, B, C, D] and [A, B, C, E]: D and E still differ. Investigate that change and check destinations; deduplication proves neither a redirect nor preservation of content.

      Reference documentation for declared URLs and metadata; the lists and calculations above are educational. Google Search Central · Build and submit a sitemap

      Situations and decisions

      Typical situations for preparing a check. They do not describe completed assignments or actual observations.

      Two extracts with different coverage

      Fictional example: before contains A and B; after contains only B because extraction stopped early. The comparator finds A absent from the second extract; this does not establish removal from the complete sitemap. Record coverage and complete extraction before classifying a deletion.

      A trailing slash appears

      Fictional example: /article becomes /article/. Exact comparison gives one removed and one added URL. It establishes neither equivalence nor a 301 redirect: check HTTP responses and canonical destinations separately.

      Worked exercise

      Twelve URLs before and after, two replacements

      Fictional example: the values and documents teach the method and do not describe a real organisation.

      Both guides initially exist in six languages. Compare URL categories rather than totals alone.

      If the table exceeds the screen, scroll horizontally; arrow keys work when the region is focused.

      Starting information
      ItemBeforeAfter
      Guide A in Finnish10
      Guide B in Finnish10
      Other guide URLs1010
      Added filtered searches02

      Your checks

      1. Compare URL sets, not just their sizes.
      2. Group removals and additions by intent and language.
      3. Check canonical and indexability of new URLs.
      Read the answer

      Answer and decision

      Ten URLs remain, two are removed and two added. Filtered searches do not replace the Finnish versions' purpose. Restore their URLs if the pages exist and remain indexable; assess additions using their canonical. Equal counts hide a coverage loss.

      If the case changes

      If only lastmod dates change, check actual editorial changes; do not count them as new content.

      Record to retain

      Keep before/after sets, per-language differences and a justified decision for each change.

      Documentation reference : Sitemaps — Protocol, lastmod · Consulted on

      Record to retain

      • Origin, filename, collection date and complete or partial scope of both files.
      • Full report of added/removed URLs, metadata changes, duplicates and skipped entries.
      • HTTP and canonical findings for pages actually checked, with check dates.
      • Decision, owner, correction and verification after regeneration.

      Official references

      Related protocols

      Checks before reaching a conclusion

      • Do both files cover the same site and scope?
      • Do invalid entries or duplicates explain count differences?
      • Is every removal or language change documented?
      • Were affected pages checked separately from the XML file?

      Frequently asked questions

      Does removing a sitemap URL deindex it?

      Removal from the file does not establish removal from the index. Check content, HTTP response and served directives, then the state observable in available tools.

      Why keep parameters and trailing slashes?

      Different forms may serve different pages or redirects. Automatic merging would hide a difference needing investigation.

      How should a large sitemap be handled?

      Check the limits of the format and chosen tool. If files are split, retain their index and comparison scope. Label a partial analysis as partial; a processing ceiling is not the actual URL count.

      TOOLS / REGISTERS

      Information to record

      Two uncompressed UTF-8 XML files, at most 5 MiB and 20,000 entries each. No page or child-sitemap download, no image/video extension comparison and no complete protocol validation. Invalid loc values are reported and excluded from matching. The export contains complete URLs.

      • Access date and time zone
      • Exact URL
      • Before/after files and scope
      • Added/removed URLs and changed metadata
      • Duplicates and excluded entries
      • HTTP status / redirect
      • Declared canonical URL
      • Language / region
      • Reason and supporting document
      • Decision / next action
      • Review owner
      • Next review