A site migration moves pages. URLs change, old addresses redirect to new ones, and some pages do not survive the move at all. The sitemap, though, is often regenerated from whatever the old site contained, or never regenerated at all, so it goes on listing addresses that now redirect or return a 404. Search engines keep being sent to doors that no longer open.
This guide explains how to check a sitemap for redirects and 404 URLs honestly, using the free Sitemap Validator on Ovatly for the part a validator can actually do. It also draws the line clearly: the validator examines the file, not the live URLs inside it. Everything runs in your browser: the XML you paste is parsed on your device and never uploaded.
Contents
- Quick answer
- Why redirects and 404 URLs end up in sitemaps
- What a validator can and cannot tell you
- How to check a sitemap, step by step
- Worked example: a post-migration file with a date error and a duplicate
- Limitations and alternatives
- Common mistakes
- FAQs
- Conclusion
Quick answer
Checking a sitemap for redirects and 404 URLs is two jobs, not one. First, validate the file itself with the Sitemap Validator: paste the XML, read the summary of file type, entry count, size and error count, fix the errors, then review the warnings. That gives you a clean, counted, trustworthy list of the URLs your sitemap claims exist. Second, work through that list knowing the validator has not visited any of it: it checks the text you paste, not the file live on your server, and it never fetches a URL to see what it returns. A redirect or a 404 written in valid format looks identical to a healthy URL on paper, so the dead addresses are found by reviewing the validated list against the site as it exists now, especially after a migration.
Why redirects and 404 URLs end up in sitemaps
The usual cause is a move. After a redesign or migration, generators rebuild the sitemap from the content they know about, and anything that was deleted, renamed or merged can linger in the output. The old address redirects for human visitors, which hides the problem, while the sitemap keeps presenting it as a page worth crawling. Pages removed return a 404, and they linger the same way.
The entry point for this whole check, as the tool's own guidance puts it, is exactly that moment: use a sitemap checker after generating a new file, after a site migration, or whenever pages stop being crawled as expected. A sitemap should list the canonical addresses you want indexed. Every redirect or dead entry in it is a stale claim about your site.
What a validator can and cannot tell you
The validator parses the pasted XML with the browser's DOMParser and checks the structure of both <urlset> files and sitemap index files, including the namespaced variants produced by common CMS plugins. It catches errors such as malformed XML, a missing or invalid URL in an entry, <lastmod> dates in the wrong format, and breaches of the protocol limits, which allow up to 50,000 URLs and 50 MB uncompressed per file. Softer problems, such as duplicate entries or a <priority> outside the 0.0 to 1.0 range, are reported as warnings instead.
Two of those findings matter directly for a redirect and 404 hunt. A missing or invalid <loc> is the closest structural cousin of a dead URL: the entry does not point anywhere usable. And the duplicate warning is the one that most often exposes a move gone untidy, because a page that was renamed frequently ends up listed twice, once at its old address and once at its new one.
What the validator cannot tell you is just as important. A clean validation means the file is well-formed and consistent; it cannot tell you whether the listed pages themselves are indexable or worth crawling. It does not fetch URLs, follow redirects or read status codes.
How to check a sitemap, step by step
- Paste the full sitemap.xml content into the Sitemap Validator.
- Read the summary: file type, entry count, size and error count. The entry count is your inventory; it is the exact number of URLs the file claims exist.
- Fix the errors first, then review the warnings. Treat every duplicate warning as a prompt to ask which of the two addresses is the live, canonical one.
- Re-paste the corrected file to confirm it is clean.
- If the file is a sitemap index, run each child sitemap it lists through the same check.
- Work through the validated URL list against the current site and remove entries whose addresses now redirect or no longer exist, keeping only canonical URLs.
Worked example: a post-migration file with a date error and a duplicate
Take a sitemap regenerated after a migration. Its first entry carries <lastmod>31-01-2026</lastmod>, and the validator fails it with the error: "URL entry 1 has an invalid <lastmod> value". Sitemap dates must be in W3C format, year first: 2026-01-31. If the same file also sets a <priority> of 1.5 somewhere, that adds a warning, because priority must stay between 0.0 and 1.0.
Neither finding mentions redirects or 404s. Until the date is corrected and the warnings are reviewed, you do not have a reliable list to audit. The duplicate warnings are where the moved pages surface: the same content listed at its old and new addresses. Resolve each pair in favour of the new canonical address, correct the date, re-paste the file, and only then treat the surviving entries as the list to check against the live site.
Limitations and alternatives
The validator checks the text you paste, not the file live on your server. After fixing errors, upload the corrected file and paste its contents once more to confirm the published copy is clean; a fixed local copy proves nothing about the version search engines will fetch. The tool also validates one file at a time, so an index file means checking each child sitemap it lists in turn.
The bigger limitation is the one this guide opened with: validation is a file check, not a crawl. It will never report that an entry redirects or returns a 404, because it never asks the server. If your sitemap passes and pages are still not indexed, the cause sits elsewhere: validation only covers the file, and indexing also depends on the pages being crawlable, canonical and valuable enough to include, so check robots rules and page quality next. For more on keeping the file itself healthy, see the other guides in the SEO Tools category.
Common mistakes
- Treating a clean validation as proof the URLs are alive. The validator never fetches them. A valid file can still list redirects and 404s.
- Skipping the warnings. Duplicates are the warning most likely to be hiding a moved page listed at both addresses.
- Fixing the local copy and forgetting the server. The published file is the one that counts; re-paste its contents after uploading to confirm it is the clean version.
- Validating the index and stopping there. Each child sitemap needs the same check, because the errors live in the children.
- Regenerating after a migration without reviewing the output. Generators rebuild from what they know, including pages that no longer exist.
FAQs
Does the validator check whether my URLs return a 404 or a redirect? No. The validator checks the text you paste, not the file live on your server, and it never fetches the URLs listed in it. A redirecting or dead URL written in valid format passes validation, which is why the URL check is a separate step after the file check.
What is the difference between an error and a warning here? Errors break the format or the protocol (malformed XML, missing loc, invalid dates, oversized files) and can make engines ignore entries or the whole file. Warnings are problems like duplicates or out-of-range priorities that engines usually tolerate but you should still fix.
My sitemap passes but pages are not indexed. Why? Validation only covers the file. Indexing also depends on the pages being crawlable, canonical, and valuable enough to include; check robots rules and page quality next.
What does a valid sitemap need? Well-formed XML, the sitemap namespace declared on the root element, an absolute URL in every entry's loc element, W3C-format dates wherever lastmod is used, and no more than 50,000 URLs or 50 MB uncompressed in a single file.
How often should I check my sitemap? Whenever the file changes: after generating a new one, after a redesign or migration, and after adding or removing a large number of pages. A quick check then is cheaper than finding crawl problems weeks later.
Conclusion
A sitemap full of redirects and 404 URLs is a stale map, and the fix starts with knowing exactly what the file claims. Validate it first: fix the errors, interrogate the duplicate warnings, and re-check the published copy, so the list you are working from is sound. Then do the part no validator can do for you and compare that list with the site as it stands today. If you are preparing a file from scratch rather than auditing an existing one, the companion guide How to Validate a Sitemap Before Submitting It walks through the pre-submission check in full.