Free XML Sitemap Validator

Enter a public sitemap URL to check whether the file can be fetched, parsed as XML, and follows the Sitemap protocol. The report explains each error, shows the affected value, and tells you how to fix it before submission.

Maintained by Sitemap WatchLast reviewed August 22, 2026
Free, no signup
URL set and index
XML and gzip
5 MB tool limit

What makes an XML sitemap valid?

A valid sitemap is well-formed UTF-8 XML with the required Sitemap protocol structure. Each entry needs a complete location, the file must stay within protocol limits, and optional fields must use valid values.

Read the Sitemap protocol

XML document

Well-formed, UTF-8 XML with valid entity escaping.

Syntax errors include line and column details when available.

Root element

Use urlset or sitemapindex with the Sitemap namespace.

Unsupported roots and missing namespaces are errors.

Location

Every entry needs one absolute HTTP or HTTPS loc under 2,048 characters.

Missing, relative, unsupported, and overlong URLs are reported.

Entry limit

No more than 50,000 URLs or child sitemaps per file.

The report compares the parsed count with the protocol limit.

Host scope

A sitemap should contain entries for a single host.

Mixed hosts and invalid cross-host index entries are reported.

Optional tags

lastmod, changefreq, and priority may be omitted, but must be valid when present.

Invalid dates, enum values, and priority ranges are identified.

How Sitemap Watch validates a sitemap

The check runs in the same Cloudflare Worker that serves this page. Sitemap Watch does not store the submitted URL or XML, crawl every listed page, or promise search engine indexing.

  1. 01

    Fetch the public URL

    The Cloudflare Worker follows up to five validated redirects and records the final HTTP response.

  2. 02

    Read a bounded response

    The validator supports gzip and reads up to 5 MB of decompressed content within an eight-second request window.

  3. 03

    Parse strict XML

    A namespace-aware XML parser checks well-formedness instead of extracting tags with regular expressions.

  4. 04

    Apply protocol rules

    The report evaluates required structure, loc values, limits, host consistency, duplicates, and optional fields.

The Sitemap protocol allows up to 50 MB uncompressed. This free online tool checks up to 5 MB per request; larger files are reported as not fully checked, not invalid.

Common sitemap errors and how to fix them

Start with the response itself, then fix XML and protocol problems. Changing tags cannot repair a sitemap URL that returns an error page or never reaches the XML document.

Could not fetch

The origin timed out, blocked automation, or returned an HTTP error.

Open the exact URL publicly and check CDN, firewall, and origin logs.

HTML response

A login page, CMS error, or SPA fallback was served instead of XML.

Correct the sitemap route and response before changing XML content.

Malformed XML

Tags, escaping, encoding, or generated output are broken.

Repair the reported location, regenerate the file, and validate again.

Missing loc

A url or sitemap entry does not contain its required location.

Add one complete HTTP or HTTPS loc value to every entry.

Mixed hosts

One sitemap contains URLs for more than one hostname.

Split each host into its own sitemap and submit the files separately.

Duplicate URLs

The generator emitted the same canonical URL more than once.

Deduplicate the source data and keep one entry per canonical URL.

URL set

A URL set lists page URLs directly inside url entries. Validate the entry count, unique locations, host consistency, lastmod values, and optional metadata.

Sitemap index

A sitemap index lists child sitemap files. This report validates the index itself; important child files should then be checked individually.

Need a deeper troubleshooting walkthrough?

The Sitemap Validator Guide explains malformed XML, sitemap indexes, duplicate entries, and fetch failures with examples and a practical repair sequence.

Read the guide

FAQ

What is a sitemap validator?

A sitemap validator fetches a sitemap URL, parses the XML, and checks whether the document follows practical Sitemap protocol rules. A useful report should identify the exact problem and explain how to fix it.

How do I validate an XML sitemap?

Enter the public sitemap URL, run the validator, and review the fetch result, XML structure, entry count, duplicate URLs, and optional tag formats. Fix errors at the sitemap source, regenerate the file, and validate it again before submission.

Can this validator check a sitemap index?

Yes. Sitemap Watch recognizes both a URL set and a sitemap index. For an index, it validates the index document and reports its child sitemap entries; it does not automatically crawl every child file in one request.

What is the maximum sitemap size?

The Sitemap protocol allows up to 50,000 entries and 50 MB uncompressed per sitemap file. This free online validator checks up to 5 MB per request and reports larger responses as not fully checked rather than invalid.

Why is my sitemap returning HTML instead of XML?

The URL may be serving a login page, CMS error, JavaScript application fallback, or missing-route page. Fix the route so the direct sitemap URL returns the XML document instead of an HTML response.

What does malformed XML mean?

Malformed XML has a syntax problem such as an unclosed tag, invalid nesting, broken entity escaping, or truncated content. The document must be well-formed before a search engine can reliably process its sitemap entries.

Does a valid sitemap guarantee indexing?

No. A valid sitemap helps search engines discover canonical URLs, but it does not guarantee crawling, indexing, or rankings. Page quality, indexability, canonical signals, and search engine decisions still apply.

Does Sitemap Watch perform full XSD validation?

No. Sitemap Watch checks XML well-formedness and the Sitemap protocol rules documented on this page. It does not claim complete validation against every XSD rule or every image, video, news, and hreflang extension.

Related sitemap tools

Continue the sitemap workflow with the next checks that usually follow this task.