XML sitemap validator
Check any XML sitemap against the official sitemaps.org protocol and Google's rules. Enter a URL, upload a file or paste the XML and get every error explained, with the fix.
Pasted and uploaded files are checked in your browser and never uploaded. URL checks fetch the file through our server and store nothing.
What gets checked
- XML well-formedness (syntax errors with line and column)
- Root element and the sitemaps.org namespace
- Required <loc> in every entry, absolute http(s) URLs under 2,048 characters
- Proper escaping of &, quotes and angle brackets in URLs
- The 50,000-URL and 50 MB uncompressed size limits
- <lastmod> dates in W3C format, with future dates flagged
- <changefreq> values and <priority> ranges
- Duplicate URLs and URLs on a different host than the sitemap
- Sitemap index files, with one-click validation of every child sitemap
Common sitemap errors and how to fix them
These are the failures we see most often, with the shortest path to green.
| Wrong or missing namespace | The <urlset> tag must declare xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" exactly. Copy it verbatim; a typo or an old 0.84 namespace makes parsers reject the whole file. |
| Unescaped ampersands in URLs | A raw & in a URL breaks XML parsing. Write & instead: /page?a=1&b=2. The same goes for < > " and '. |
| Relative or malformed URLs | Every <loc> must be a full absolute URL including the scheme, like https://example.com/page/. Relative paths such as /page/ are invalid. |
| Invalid lastmod dates | Use W3C datetime format: 2026-07-16 or 2026-07-16T09:30:00+00:00. Formats like 16/07/2026 or Unix timestamps are invalid, and dates in the future get ignored. |
| Over 50,000 URLs or 50 MB | Split the sitemap into several files and list them in a sitemap index. Most generators do this automatically once you pass the limit. |
| Sitemap returns an error or HTML | The sitemap URL must return HTTP 200 with XML content. A 404, a redirect chain to an error page, or an HTML error page dressed as sitemap.xml are all common. |
| URLs on the wrong host | URLs in a sitemap must live on the same host that serves the sitemap, including the same www or non-www form and the same scheme (https). |
| Blocked by robots.txt | If robots.txt disallows the URLs listed in your sitemap, crawlers receive contradictory signals. Align the two: the sitemap should list only pages you want crawled. |
From the blog
robots.txt for AI Crawlers: Allow and Deny Recipes
Three recipes and a bot-by-bot table for controlling GPTBot, ClaudeBot, PerplexityBot and the rest from one small text file.
SitemapsXML Sitemap Errors: Every Common Failure and Its Fix
Nine failures cause almost every broken sitemap. Here is how to recognize each one from its symptom and fix it for good.
SitemapsXML Sitemap Best Practices That Actually Matter
Half of the standard sitemap advice is folklore. These are the practices search engines actually respond to, and the fields they ignore.