How to Validate Your XML Sitemap (and Fix the Errors Google Actually Cares About)
A sitemap that Google can't parse is worse than no sitemap at all — it can quietly stop new pages from getting discovered for weeks. Here's what a validator actually checks, the errors that matter, and how to fix each one.
What an XML sitemap actually does
An XML sitemap is a file — usually at yoursite.com/sitemap.xml — that lists every URL you want search engines to know about. It doesn't force Google to rank those pages, and it doesn't even guarantee they get crawled. What it does is remove the guesswork: instead of Google finding your pages by following links around your site (which can take a while, especially for a new page with no internal links pointing to it yet), you hand it the full list directly.
That matters most in three situations: a brand-new site with little existing link equity, a large site where some pages are buried deep in the navigation, and any site that publishes new pages regularly and wants them discovered fast.
What a sitemap validator checks
"Validating" a sitemap isn't just checking that the XML doesn't have a typo. A real validator checks:
- Valid XML syntax — unclosed tags, bad character encoding, or malformed structure will make Google reject the whole file, not just the broken line.
- Correct namespace declaration — every sitemap needs the right
xmlnsattribute or search engines won't recognize it as a sitemap at all. - Absolute URLs — every
<loc>entry must be a full URL (https://example.com/page), not a relative path. - Size limits — a single sitemap file can't exceed 50,000 URLs or 50MB uncompressed. Bigger sites need a sitemap index file that points to multiple sitemap files.
- Correct
lastmodformat — must be a valid W3C datetime (YYYY-MM-DDat minimum), or Google ignores the field entirely. - Live URLs — every URL listed should actually return a 200 status. Sitemaps full of 404s or old redirects waste crawl budget and signal poor maintenance.
- No conflicting signals — a URL in your sitemap that's also blocked by
robots.txtor has anoindextag is telling Google two contradictory things at once.
Run all of these checks at once with CheckSEO's Sitemap Validator — paste your sitemap URL, get every error flagged in one pass. No signup.
Open the Sitemap ValidatorThe 7 most common sitemap errors (and how to fix them)
Relative URLs instead of absolute
/blog/post-1 instead of https://example.com/blog/post-1. Google's spec requires absolute URLs — a relative path gets silently skipped. Fix: most sitemap generators do this correctly by default; if you hand-rolled your sitemap or a plugin misconfigured the site URL, regenerate it with the full domain included.
URLs blocked by robots.txt
Listing a URL in your sitemap while also disallowing it in robots.txt sends a mixed signal, and Google generally won't crawl it. Fix: check the URL against your robots.txt rules — if the page should be indexed, remove the disallow; if it shouldn't be, remove it from the sitemap instead.
Non-200 status codes
URLs that 404, redirect (301/302), or return a server error waste crawl budget and make the sitemap look unmaintained. Fix: remove dead URLs and update any that have moved to their final destination — don't list the redirect source.
Missing or malformed lastmod
An invalid date format doesn't break the sitemap, but Google just ignores the field — meaning it can't prioritize recrawling your most recently updated pages. Fix: use ISO 8601 format (2026-09-06 or with a time component), and only update it when the page's actual content changes, not on every deploy.
Exceeding the 50,000 URL / 50MB limit
A single sitemap file over either limit gets rejected outright. Fix: split into multiple sitemap files (e.g. by content type or date range) and reference them all from one sitemap index file.
Sitemap not referenced in robots.txt
Not strictly an "error," but a missed opportunity — adding Sitemap: https://example.com/sitemap.xml to robots.txt is the most reliable way to make sure every crawler finds it, not just the ones you've manually submitted it to. Fix: add the line; it takes one edit.
Orphaned or duplicate URLs
The same URL listed twice (often with different lastmod values from different plugins fighting each other) confuses prioritization signals. Fix: deduplicate the list — most CMS sitemap plugins conflict when you run more than one at once, so check for that first.
How to check yours right now
Paste your sitemap URL into CheckSEO's Sitemap Validator and it runs every check above in one pass — syntax, size, dead links, and robots.txt conflicts — with each issue explained plainly, not buried in an XML parser error message.
Frequently asked questions
How do I know if my sitemap is valid?
Run it through a validator that checks syntax, URL status codes, and size limits together — a sitemap can be syntactically valid XML and still be functionally broken (e.g., full of 404s), so syntax-only checking isn't enough.
Do websites still need a sitemap in 2026?
Yes, especially for new sites, large sites, and sites that publish frequently. Google can find pages without one via links, but a sitemap removes discovery lag — it's the single cheapest thing you can do to speed up indexing.
What's the difference between a sitemap and a sitemap index?
A sitemap lists URLs directly. A sitemap index lists other sitemap files — you need one once your site exceeds 50,000 URLs or 50MB in a single sitemap file.
How often should I update my sitemap?
Automatically, whenever pages are added, removed, or their content meaningfully changes — most CMS platforms and static site generators do this on every build. Manually maintaining one is rarely worth it past a handful of pages.
Does having sitemap errors hurt my rankings directly?
Not directly as a ranking factor — but indirectly, yes: errors that stop pages from being discovered or crawled mean those pages can't rank at all, regardless of how good the content is.
Check your own site with the Sitemap Validator.
Open Sitemap ValidatorMore from the blog
What Is Keyword Density, and How Much Is Actually Too Much?
Keyword density isn't the ranking factor most people think it is. The real formula, healthy ranges by content type, and a free checker to test your own page.
Robots.txt Checker: How to Test Your File Before It Blocks Google
One wrong line in robots.txt can deindex your entire site. See the most dangerous robots.txt mistakes and test yours free with CheckSEO's Robots.txt Checker.