XML Sitemap Validator
Test any XML sitemap against the sitemaps.org protocol. Paste a sitemap URL, or just a domain and the tool will find it for you.
What gets checked
Sitemap errors split into two kinds. Protocol errors stop the file being parsed at all. SEO errors let it parse but make it useless, or worse, make Google trust it less. This tool reports both, separated by severity.
Structure and protocol
- Root element. The file must open with urlset or sitemapindex. Anything else is not a sitemap.
- Namespace. The root must declare xmlns as http://www.sitemaps.org/schemas/sitemap/0.9, exactly.
- XML declaration and encoding. A missing declaration or a leading byte order mark breaks strict parsers.
- Content-Type. Sitemaps served as text/html rather than XML are a common CDN misconfiguration.
- Size limits. 50,000 URLs and 50MB uncompressed, both counted per file.
URL rules
- Absolute URLs. Every loc must include the protocol and host. Relative paths are silently dropped by crawlers.
- Same host. A sitemap may only list URLs on the hostname it is served from. Cross-domain entries are ignored outright.
- Escaping. Ampersands inside a loc must be written as an entity, or the XML is invalid.
- Duplicates. Repeated URLs waste crawl budget and send conflicting lastmod signals.
- Fragments. Anything after a hash is not a separate page and should not appear.
- Whitespace. Leading or trailing spaces inside a loc trip strict parsers.
Optional fields
- lastmod format. Must be a W3C datetime, not a locale date string or a timestamp.
- Future lastmod. Dates ahead of today are the fastest way to make Google stop trusting the field.
- changefreq values. Only the seven allowed keywords, from always through never.
- priority range. A decimal from 0.0 to 1.0. A uniform value across every URL carries no information at all.
The distinction that matters
A valid sitemap and a useful sitemap are different things. This tool answers the first question. To answer the second, run the sitemap crawler, which fetches every URL the sitemap declares and reports the dead links, redirects, and noindex pages inside it.
How to fix a failing sitemap
- 01
Fix the errors first
Anything marked as an error either breaks parsing or gets the entries silently dropped. Warnings can wait; errors cannot.
- 02
Check where the file comes from
Most sitemaps are generated. Fixing the file by hand only works until the next build, so fix the generator or the plugin instead.
- 03
Re-run the validator
Confirm the file parses cleanly before you go anywhere near Search Console.
- 04
Crawl the URLs inside it
A clean file full of 404s still fails. The sitemap crawler checks every URL for status, indexability, and canonical conflicts.
- 05
Resubmit in Search Console
Open Indexing, then Sitemaps, and resubmit. Google reports its own parse result within a few days.
Common sitemap errors and what causes them
- Could not fetch. Usually a sitemap behind authentication, blocked in robots.txt, or returning a 403 to non-browser user agents.
- Wrong namespace. Nearly always a hand-written file, or a template that copied an RSS namespace by mistake.
- Cross-domain URLs. Common after a domain migration where the generator still holds the old hostname in config.
- Invalid lastmod. A CMS writing dates in the site locale rather than in ISO 8601 form.
- Over 50,000 URLs. A generator that never learned to split, usually on a large ecommerce catalogue.
- Served as HTML. A CDN or framework rewrite catching the .xml path and returning the app shell instead of the file.
If the validator cannot find a sitemap at all, the sitemap finder checks robots.txt plus nine common locations and reports which ones exist.
Frequently Asked Questions
What does this sitemap validator check?
It fetches the file, parses it, and checks it against the sitemaps.org 0.9 protocol plus the SEO rules that cause real indexing problems. That covers the XML namespace, the 50,000 URL and 50MB limits, absolute URLs, escaping, duplicates, cross-domain entries, W3C lastmod formats, valid changefreq values, and priority ranges.
Can I paste a domain instead of a sitemap URL?
Yes. Give it example.com and it looks for the sitemap first, checking robots.txt directives and nine common paths, then validates whatever it finds. Paste the full sitemap URL if you want to test one specific file.
Does it work with sitemap index files?
Yes. It detects whether the root element is urlset or sitemapindex and validates accordingly, listing the child sitemaps it found. To check the URLs inside every child, use the sitemap extractor or the sitemap crawler instead.
Does it handle gzipped sitemaps?
Yes. A sitemap.xml.gz is decompressed before parsing, and the reported size is the uncompressed one, because that is what counts against the 50MB protocol limit.
Why is my lastmod flagged as invalid?
lastmod must be a W3C datetime. That means 2026-07-26, or 2026-07-26T09:30:00+00:00 with a timezone. Formats like 26/07/2026 or a bare Unix timestamp are rejected by the protocol, and Google will ignore the field.
Why does it warn about future lastmod dates?
Google evaluates whether your lastmod values are trustworthy before it uses them. Dates in the future are one of the clearest signals that the field is generated rather than accurate, and once Google stops trusting lastmod on a site it ignores it across the whole sitemap.
My sitemap passes here but Google reports an error. Why?
This tool validates the file. Google also checks the URLs inside it, which is a different question. A sitemap can be perfectly valid XML and still be full of 404s, redirects, or noindex pages. Run the sitemap crawler to check the URLs themselves.
Does a validation warning hurt my rankings?
Not directly. Sitemaps affect discovery and crawl scheduling rather than ranking. The practical cost of a broken sitemap is that new pages take longer to get found and updated pages take longer to get recrawled.
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 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 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 which sitemap URLs actually get indexed
CrawlRaven joins your crawl to your Search Console and GA4 data, so you can see every sitemap URL that Google has never indexed and every indexed page your sitemap forgot.