Sitemap Validator
Checked Against the Protocol
Paste a domain or a sitemap address. This reads the file the way a crawler does and reports what is actually wrong with it, with the line number where there is one and the correction to make.
Leave the path off and the usual addresses are tried in order, starting with
whatever robots.txt declares.
Result
What this checks, and what it does not
The document
Whether the XML parses at all, whether the root element is urlset
or sitemapindex, whether the sitemap namespace is declared, and
whether the file stays inside the 50,000 URL and 50 MB limits one sitemap is
allowed.
Every loc is checked for being an absolute address, every
lastmod for being a real W3C date rather than a guess, and
duplicate entries are counted.
The index, and robots.txt
A sitemap index is followed, and each child is held to the same standard as the parent rather than being counted and trusted. A child on another host is reported rather than fetched, and nesting is refused.
Finally it checks whether robots.txt declares the sitemap you
actually have, because a declaration is how a sitemap at a non-obvious
address gets found at all.
What it does not do
It does not test whether the pages inside your sitemap work. A sitemap can be perfectly valid and still list forty dead URLs, because those are two different faults with two different fixes. Run the Broken Link Checker for the URLs and this for the file.
Why a broken sitemap is easy to miss
A sitemap that fails to parse is not reported as broken by anything. The parser returns false, and every caller in every crawler treats false as "this site has no sitemap" and carries on. So the one fault you most need to hear about is the one that produces no error, no warning and no line in a log. The site simply stops being crawled from that file.
The usual cause is a single unescaped ampersand in a query string. A URL like
?a=1&b=2 written without the entity is invalid XML on that line,
and it takes the whole document with it.
If you have no sitemap at all
A sitemap is how you tell a crawler about pages it might not reach by following links, and it is the fastest way to get a new URL noticed.
Read the sitemap guideIf robots.txt is the problem
A Disallow line that blocks your sitemap wastes crawl budget and
can leave a page out of the index entirely. The tester checks the rules as a
crawler would read them.