Free tool, no signup required

XML Sitemap Validator

Test any XML sitemap against the sitemaps.org protocol. Paste a sitemap URL, or just a domain and the tool will find it for you.

3 checks remaining today (free)

Short answer

A sitemap validator checks an XML sitemap against the sitemaps.org 0.9 protocol: the XML declaration, the namespace, absolute URLs on the same host, valid W3C datetime lastmod values, and the 50,000 URL and 50MB limits. It matters because a sitemap that fails to parse is not partially read, it is discarded entirely, and Search Console reports that as a generic fetch error rather than telling you which line broke.

What gets checked

Sitemap errors split into two kinds. Protocol errors stop the file being parsed at all. SEO errors let it parse but make it useless, or worse, make Google trust it less. This tool reports both, separated by severity.

Structure and protocol

  • Root element. The file must open with urlset or sitemapindex. Anything else is not a sitemap.
  • Namespace. The root must declare xmlns as http://www.sitemaps.org/schemas/sitemap/0.9, exactly.
  • XML declaration and encoding. A missing declaration or a leading byte order mark breaks strict parsers.
  • Content-Type. Sitemaps served as text/html rather than XML are a common CDN misconfiguration.
  • Size limits. 50,000 URLs and 50MB uncompressed, both counted per file.

URL rules

  • Absolute URLs. Every loc must include the protocol and host. Relative paths are silently dropped by crawlers.
  • Same host. A sitemap may only list URLs on the hostname it is served from. Cross-domain entries are ignored outright.
  • Escaping. Ampersands inside a loc must be written as an entity, or the XML is invalid.
  • Duplicates. Repeated URLs waste crawl budget and send conflicting lastmod signals.
  • Fragments. Anything after a hash is not a separate page and should not appear.
  • Whitespace. Leading or trailing spaces inside a loc trip strict parsers.

Optional fields

  • lastmod format. Must be a W3C datetime, not a locale date string or a timestamp.
  • Future lastmod. Dates ahead of today are the fastest way to make Google stop trusting the field.
  • changefreq values. Only the seven allowed keywords, from always through never.
  • priority range. A decimal from 0.0 to 1.0. A uniform value across every URL carries no information at all.

The distinction that matters

A valid sitemap and a useful sitemap are different things. This tool answers the first question. To answer the second, run the sitemap crawler, which fetches every URL the sitemap declares and reports the dead links, redirects, and noindex pages inside it.

How to fix a failing sitemap

  1. 01

    Fix the errors first

    Anything marked as an error either breaks parsing or gets the entries silently dropped. Warnings can wait; errors cannot.

  2. 02

    Check where the file comes from

    Most sitemaps are generated. Fixing the file by hand only works until the next build, so fix the generator or the plugin instead.

  3. 03

    Re-run the validator

    Confirm the file parses cleanly before you go anywhere near Search Console.

  4. 04

    Crawl the URLs inside it

    A clean file full of 404s still fails. The sitemap crawler checks every URL for status, indexability, and canonical conflicts.

  5. 05

    Resubmit in Search Console

    Open Indexing, then Sitemaps, and resubmit. Google reports its own parse result within a few days.

Common sitemap errors and what causes them

  • Could not fetch. Usually a sitemap behind authentication, blocked in robots.txt, or returning a 403 to non-browser user agents.
  • Wrong namespace. Nearly always a hand-written file, or a template that copied an RSS namespace by mistake.
  • Cross-domain URLs. Common after a domain migration where the generator still holds the old hostname in config.
  • Invalid lastmod. A CMS writing dates in the site locale rather than in ISO 8601 form.
  • Over 50,000 URLs. A generator that never learned to split, usually on a large ecommerce catalogue.
  • Served as HTML. A CDN or framework rewrite catching the .xml path and returning the app shell instead of the file.

If the validator cannot find a sitemap at all, the sitemap finder checks robots.txt plus nine common locations and reports which ones exist.

Every check, and what a failure means

The checks below run against the sitemaps.org 0.9 schema. The first three are fatal: fail one and the file is not partially read, it is discarded.

CheckSeverityWhat causes it
XML parses at allFatalAn unescaped ampersand in a URL, or a truncated file
Correct namespaceFatalA hand-written sitemap missing the sitemaps.org 0.9 xmlns
urlset or sitemapindex rootFatalAn index file served with the wrong root element
Absolute URLsErrorRelative paths, which are not valid in a sitemap
Same host as the sitemapErrorURLs on a different subdomain or protocol
Valid W3C lastmodErrorA local date format, or a time with no timezone offset
50,000 URL limitErrorA generator that never learned to split into an index
50MB uncompressed limitErrorLong URLs at high volume, usually before the URL cap
No duplicate loc valuesWarningTwo generators writing into the same file

Frequently asked questions

What does this sitemap validator check?

It fetches the file, parses it, and checks it against the sitemaps.org 0.9 protocol plus the SEO rules that cause real indexing problems. That covers the XML namespace, the 50,000 URL and 50MB limits, absolute URLs, escaping, duplicates, cross-domain entries, W3C lastmod formats, valid changefreq values, and priority ranges.

Can I paste a domain instead of a sitemap URL?

Yes. Give it example.com and it looks for the sitemap first, checking robots.txt directives and nine common paths, then validates whatever it finds. Paste the full sitemap URL if you want to test one specific file.

Does it work with sitemap index files?

Yes. It detects whether the root element is urlset or sitemapindex and validates accordingly, listing the child sitemaps it found. To check the URLs inside every child, use the sitemap extractor or the sitemap crawler instead.

Does it handle gzipped sitemaps?

Yes. A sitemap.xml.gz is decompressed before parsing, and the reported size is the uncompressed one, because that is what counts against the 50MB protocol limit.

Why is my lastmod flagged as invalid?

lastmod must be a W3C datetime. That means 2026-07-26, or 2026-07-26T09:30:00+00:00 with a timezone. Formats like 26/07/2026 or a bare Unix timestamp are rejected by the protocol, and Google will ignore the field.

Why does it warn about future lastmod dates?

Google evaluates whether your lastmod values are trustworthy before it uses them. Dates in the future are one of the clearest signals that the field is generated rather than accurate, and once Google stops trusting lastmod on a site it ignores it across the whole sitemap.

My sitemap passes here but Google reports an error. Why?

This tool validates the file. Google also checks the URLs inside it, which is a different question. A sitemap can be perfectly valid XML and still be full of 404s, redirects, or noindex pages. Run the sitemap crawler to check the URLs themselves.

Does a validation warning hurt my rankings?

Not directly. Sitemaps affect discovery and crawl scheduling rather than ranking. The practical cost of a broken sitemap is that new pages take longer to get found and updated pages take longer to get recrawled.

Does a sitemap have to be XML?

No. A plain text file listing one URL per line is valid and Google accepts it, as is an RSS or Atom feed. XML is the format worth using because it is the only one that carries lastmod, and lastmod is the field Google actually reads.

Can a sitemap live somewhere other than the root?

Yes, with one constraint: a sitemap may only list URLs at or below its own directory. A sitemap at /shop/sitemap.xml can list /shop/anything but not /blog/anything. Declaring it in robots.txt lifts that restriction for Google, which is one more reason to have the directive.

What is a sitemap index file?

A sitemap listing other sitemaps rather than pages. It is how you get past the 50,000 URL limit: split the URLs across several files and point at all of them from one index. An index may itself list 50,000 sitemaps, which is more headroom than any real site needs.

Read up on sitemaps

A tool tells you what is wrong. These explain what to do about it.

Terms this tool checks

  • XML Sitemap

    An XML sitemap is a file (typically at /sitemap.xml) that lists all the important URLs on your website along with metadata like last modification date, change frequency, and priority.

  • Indexation

    Indexation is the process by which search engines add web pages to their searchable database (index).

  • Noindex

    Noindex is a robots meta tag directive (meta name="robots" content="noindex") that tells search engines not to include a specific page in their search index.

  • Canonical Tag

    A canonical tag (rel="canonical") is an HTML element that tells search engines which version of a page is the preferred, authoritative copy when multiple URLs serve similar or identical content.

See which sitemap URLs actually get indexed

CrawlRaven joins your crawl to your Search Console and GA4 data, so you can see every sitemap URL that Google has never indexed and every indexed page your sitemap forgot.