What Is an XML Sitemap Validator?
An XML sitemap validator checks that your sitemap is a file search engines can read and trust. One stray character, such as an unescaped & in a URL, can break the whole file. Smaller mistakes, like relative URLs or badly formatted dates, quietly cause Google to skip entries.
Paste the XML and the validator reads it in your browser, checks every entry and tells you exactly which URL to fix and why. Nothing is uploaded, so it works for staging sites and private projects too.
How to Validate Your Sitemap
- Open your sitemap, for example
yourdomain.com/sitemap.xml, and view the page source. - Copy all of the XML and paste it into the box.
- Add the sitemap location so the tool can check the host and folder rules.
- Fix every error first, then review the warnings.
- Resubmit the sitemap in Search Console once it is clean.
What the Validator Checks
| Check | Why it matters |
|---|---|
| Well formed XML | A single syntax error makes the whole file unreadable |
| Root tag and namespace | urlset or sitemapindex with the sitemaps.org namespace |
| Full, encoded URLs | Every loc needs the protocol and domain, with spaces encoded |
| Same host and folder | A sitemap normally covers only URLs on its own host and below its folder |
| Valid lastmod dates | W3C format only. Dates like 28/10/2026 are rejected |
| changefreq and priority | Must use allowed values, though Google ignores both |
| Duplicates and tracking codes | Waste crawling and send mixed signals about the canonical URL |
| 50,000 URLs and 50 MB | The hard limits for one file |
The rules follow the sitemaps.org protocol and Google's sitemap guidelines.
Tips After Validating
- Valid is not the same as useful. Make sure every URL returns a 200 status, is canonical and is not marked noindex.
- Watch the Sitemaps report in Search Console for fetch errors and the number of discovered pages.
- Fix the source, not the file. If your CMS or plugin writes bad dates, change its settings so the problem does not return.
- Check child sitemaps. For an index file, validate each listed sitemap as well.
Keep Your Sitemaps Healthy
Fix pages Google found but skipped with discovered, currently not indexed, learn how to manage big sites with a sitemap index generator in PHP, and see whether IndexNow can speed up indexing. Need a fresh file? Build one with the XML sitemap generator.
Frequently Asked Questions
1Why does Search Console say my sitemap could not be read?
Usually the file is not valid XML, often because of an unescaped ampersand, a missing closing tag, or an HTML error page served instead of the sitemap. Paste the XML here to find the first error.
2Are relative URLs allowed in a sitemap?
No. Every loc must be a full URL including https and the domain. A path like /contact/ on its own is rejected by Google.
3What date format should lastmod use?
Use the W3C datetime format. A simple date like 2026-11-04 is fine, or add the time and time zone, like 2026-11-04T10:30:00+05:30.
4Can I validate a sitemap index file?
Yes. Paste a sitemap index and the tool checks each listed sitemap URL and date. Then paste each child sitemap to check the pages inside it.