About the Sitemap Validator
This tool downloads an XML sitemap or sitemap index and checks it against the sitemaps.org protocol and Google's guidelines. Enter a sitemap URL, or just a domain: the tool then looks for Sitemap: lines in robots.txt and falls back to /sitemap.xml. Gzipped sitemaps (.xml.gz) and plain-text sitemaps with one URL per line work too.
It checks that the XML is well-formed and uses the sitemap namespace, that the file stays within 50,000 URLs and 50 MB uncompressed, that every <loc> is an absolute URL on the sitemap's own host, that <lastmod> uses the W3C Datetime format and isn't in the future, and that no URL is listed twice. Invalid <changefreq> and <priority> values are flagged, although Google ignores both. It reads up to 10 MB and says when a larger file was only partly checked.
Up to 10 listed URLs, spread across the file, are then requested to confirm they return 200 rather than a redirect or an error. For a sitemap index, it lists the child sitemaps and checks the first three.
How to use it
- Enter a sitemap URL or a domain.
- Select Validate sitemap.
- Fix the errors first, then the warnings; each issue shows a count and examples.
Examples
- Validate the sitemap of webmastertools.dev: found through robots.txt.
- Validate a sitemap by its URL: checked directly.
Common questions
Can a sitemap list URLs on another domain?
Normally no: a sitemap may only list URLs on its own host, and www and the bare domain count as different hosts. Google accepts cross-host sitemaps only when robots.txt on the target host points to them or both sites are verified in Search Console.
Does Google use priority and changefreq?
No. Google ignores both. It uses <lastmod> when the dates are consistently accurate.
Should redirected URLs be in the sitemap?
No. List the final URLs that return 200 and are canonical, so crawlers don't spend requests on redirects.
Related tools
- Robots.txt Tester: see which sitemaps robots.txt declares.
- Broken Link Checker: check up to 100 URLs from a sitemap.
- Indexability Checker: test one listed URL in depth.