ModernCalcs

XML Sitemap Validator

Validate a sitemap.xml (or sitemap index) against the sitemap protocol: required <loc>, valid dates, changefreq, priority, and the 50,000 URL limit.

Valid sitemap

XML Sitemap Validator: Check Your Sitemap Against the Protocol

A sitemap with a relative URL, an invalid changefreq value, or more than 50,000 entries can get rejected or partially ignored by search engines — and Search Console often reports the problem in vague terms. This validator checks a sitemap.xml (or sitemap index) directly against the sitemaps.org protocol so you know exactly what to fix.

Formula
<urlset> -> <url><loc>required</loc></url>

lastmod, changefreq, and priority are all optional per-URL hints.

Only <loc> Is Actually Required

It's easy to assume lastmod, changefreq, and priority are mandatory because generators often include them by default, but the sitemap protocol only requires — the absolute URL — on each entry. The other fields are optional hints, and search engines are free to ignore them (Google explicitly deprioritizes changefreq and priority in its own crawl scheduling).

The 50,000 URL / 50MB Limit

A single sitemap file can't exceed 50,000 URLs or 50MB uncompressed. Large sites split their URLs across multiple sitemap files (sitemap-1.xml, sitemap-2.xml, etc.) and reference all of them from one file, which itself just lists sitemap file locations rather than page URLs.

Common Validation Failures

Relative URLs in (must be absolute), a changefreq value outside the fixed vocabulary (always/hourly/daily/weekly/monthly/yearly/never), a priority outside the 0.0-1.0 range, and a missing or incorrect xmlns namespace declaration are the most common reasons a sitemap fails strict validation.

Practical Examples

Catching a Relative URL

A common templating mistake.

  • 1./about
  • 2.Error: not an absolute URL
  • 3.Fix: https://example.com/about

Splitting a Large Sitemap

Handling more than 50,000 URLs.

  • 1.60,000 total URLs
  • 2.Split into sitemap-1.xml (50,000) and sitemap-2.xml (10,000)
  • 3.Reference both from sitemap-index.xml

What Gets Checked

  • Well-formed XML
  • <urlset> or <sitemapindex> root
  • Required <loc>, must be absolute
  • Valid lastmod date format
  • Valid changefreq vocabulary
  • Priority in range 0.0-1.0
  • 50,000 URL limit
  • Duplicate URLs

Good Use Cases

  • Validating a generated sitemap before submitting to Search Console
  • Debugging a Search Console sitemap error report
  • Checking a sitemap index references valid sitemap URLs
  • Confirming a large site's sitemap stays under the URL limit

Frequently Asked Questions

What are the required fields in a sitemap?

Only is required for each entry — the absolute URL of the page. , , and are all optional hints, and modern search engines like Google largely ignore changefreq and priority anyway, treating lastmod as the most useful of the three.

What's the 50,000 URL limit about?

The sitemap protocol caps a single sitemap file at 50,000 URLs (and 50MB uncompressed). Sites with more URLs than that split them across multiple sitemap files and reference them all from a single file.

What's the difference between <urlset> and <sitemapindex>?

is a regular sitemap listing actual page URLs directly. is a sitemap of sitemaps — it lists other sitemap files (via ) instead of pages, used when a site's full sitemap needs to be split across multiple files.

Does the changefreq value actually affect how often Google crawls a page?

Google has stated it treats changefreq (and priority) as a hint at best and largely determines crawl frequency using its own signals instead. It's still worth setting correctly since other search engines and tools may weight it differently, and an invalid value can cause some validators to reject the sitemap outright.

Why does the xmlns namespace matter?

The sitemap protocol requires the xmlns attribute on to declare the sitemap XML namespace (http://www.sitemaps.org/schemas/sitemap/0.9). Without it, some strict parsers may not recognize the document as a valid sitemap even if the structure is otherwise correct.

Is my sitemap content uploaded anywhere?

No, validation runs entirely in your browser using the native DOMParser XML engine — no upload.