Check line

Sitemap validator and checker

Fetch a live sitemap, paste the XML or open a file. Every rule from the sitemaps.org protocol and Google's extension specs is checked, with line numbers and a fix for each problem.

One request, same host only, obeys robots.txt, 10 MB cap. The XML itself is checked in your browser.

No sitemap handy?

Results appear here. Pasted and uploaded XML never leaves your browser.

Errors that stop a sitemap from being read

Most failures come down to a handful of mistakes. They are listed roughly from most to least common in real-world sitemaps.

An unescaped ampersand

A URL like /shop?color=red&size=m must be written /shop?color=red&amp;size=m inside <loc>. One raw & makes the whole file malformed XML, and crawlers reject it outright.

HTML instead of XML

The URL returns a web page: a 404 template, a login wall, a cookie banner page or a redirect to the home page. The validator catches this as soon as it sees <html>.

Relative or protocol-less URLs

The protocol requires fully qualified URLs. /pricing and example.com/pricing are both invalid; write https://example.com/pricing.

Wrong or missing namespace

The root must be <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">. A typo there, or an https version of the namespace URL, means the entries aren't recognised.

Bad dates

lastmod must be W3C Datetime: 2026-09-27 or 2026-09-27T14:30:00+00:00. Formats like 27/09/2026 or a time without a timezone are invalid.

Whitespace before the XML declaration

A blank line or byte-order quirk ahead of <?xml is a classic side effect of a PHP or theme file echoing a newline. Many parsers refuse the file.

Questions people ask

What does this sitemap checker test?
Well-formed XML; UTF-8; the root element and the sitemaps.org namespace; the 50,000-entry and 50 MB limits; absolute http(s) loc URLs under 2,048 characters; duplicates and fragments; mixed hosts or protocols; W3C Datetime lastmod values and future dates; valid changefreq/priority values; and the required fields of image, video, news and hreflang (xhtml:link) extensions.
Is the sitemap uploaded anywhere?
Pasted and uploaded files are checked entirely in your browser. When you use “Fetch URL”, our server makes one request for that single file (it follows robots.txt and only same-host redirects) and passes the XML back to your browser for checking. Nothing is stored.
My sitemap passes here but Search Console says “Couldn’t fetch”. Why?
Search Console often shows “Couldn’t fetch” for a while after a new submission; it is a pending state as much as an error. If it persists, the usual causes are a firewall or bot protection blocking Googlebot, a robots.txt block, or a URL that redirects or returns HTML to Google. The troubleshooter walks through each case.
Why are priority and changefreq only “notes”?
They are valid in the protocol, so they are not errors. But Google has stated it ignores both, so they are flagged for information only.
Does this validate against the XSD schema?
It applies the rules the XSD encodes (allowed elements, required loc, value ranges and formats) plus checks the schema cannot express, such as duplicates, mixed hosts and future dates. Each finding points to a line number.
Can I validate a sitemap index?
Yes. Indexes are detected automatically. The child sitemap URLs are listed with a one-click “check this one” so you can walk through each file.