Diagnostic tool

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.

Choose a .xml or .xml.gz file (up to 50 MB)

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 namespaceThe <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 URLsA raw & in a URL breaks XML parsing. Write &amp; instead: /page?a=1&amp;b=2. The same goes for < > " and '.
Relative or malformed URLsEvery <loc> must be a full absolute URL including the scheme, like https://example.com/page/. Relative paths such as /page/ are invalid.
Invalid lastmod datesUse 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 MBSplit 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 HTMLThe 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 hostURLs 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.txtIf 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

All guides →

Frequently asked questions

How do I validate an XML sitemap?
Enter the sitemap's URL in the checker above and click Validate. WebDoctor downloads the file, parses it like a search engine crawler would, and lists every error and warning with an explanation and a fix. You can also upload the file or paste the XML directly.
What is the maximum size of an XML sitemap?
The protocol allows at most 50,000 URLs and 50 MB uncompressed per sitemap file. Bigger sites split their URLs across multiple sitemaps and list them in a sitemap index file, which may itself reference up to 50,000 sitemaps.
Does Google use changefreq and priority?
No. Google has confirmed it ignores both fields, and Bing largely does too. They are valid XML and this checker only warns when their values are malformed, but your crawl is steered by lastmod accuracy and internal linking, not by priority values.
Is a sitemap index different from a sitemap?
Yes. A sitemap index uses <sitemapindex> as its root element and lists other sitemap files instead of pages. Paste an index into this checker and it validates the index itself, then lets you check each child sitemap with one click.
Why does my valid sitemap still show errors in Search Console?
Search Console also checks things outside the file itself: whether URLs redirect, return 404s, are blocked by robots.txt or are non-canonical. Validate the XML here first, then fix the per-URL crawl issues Search Console reports.