Skip to main content
ToolsHub

XML Sitemap Validator

Enter a sitemap URL and get an instant report: urlset or sitemap index, total URLs, sample entries, child sitemaps, and every validation issue found.

Updated

How to use XML Sitemap Validator

The XML Sitemap Validator checks remote sitemap files by fetching them server-side, then parsing structure and key protocol rules in a report you can act on quickly. Enter any public sitemap URL and the validator identifies whether it is a urlset or sitemapindex, counts entries, shows the first 50 URLs, lists child sitemap files, and flags common problems such as missing <loc> tags, invalid <lastmod> dates, wrong namespaces, or over-limit entry counts. Because the request runs through a guarded same-origin API route, browser CORS is never a blocker and private/local network targets are rejected for safety.

  1. Paste a full sitemap URL such as https://example.com/sitemap.xml into the input field.
  2. Click Validate to fetch and parse the XML through the ToolsHub API route.
  3. Review the detected type, URL count, and namespace summary cards.
  4. Inspect the first 50 URLs and child sitemap list to confirm expected coverage.
  5. Fix each reported issue and re-run the validator until no blocking errors remain.

What protocol checks matter most

A valid sitemap must use either a <urlset> root for page URLs or a <sitemapindex> root for child sitemap files, and it should declare the official namespace http://www.sitemaps.org/schemas/sitemap/0.9. Within each url or sitemap node, <loc> is mandatory and should contain an absolute URL. Optional <lastmod> values should be valid ISO-style dates so crawlers can trust freshness hints. Files should stay under 50,000 entries per document, and very large sites should split output by section then reference each child file from a sitemap index. These checks catch most real-world indexing failures before they reach production.

Core sitemap validation checks
CheckExpected ruleFailure example
Root elementurlset or sitemapindexCustom root like <feed>
Namespacehttp://www.sitemaps.org/schemas/sitemap/0.9Missing or incorrect xmlns
loc presenceEvery entry has <loc>URL block without loc
lastmod formatISO date or datetimeFree-text date string
Entry limitMaximum 50,000 entriesSingle file exceeding limit

Why server-side validation is useful

Many sitemap validators running in the browser fail because cross-origin requests are blocked by CORS. A same-origin server route solves this by fetching the sitemap on your behalf, then returning clean JSON to the widget. This also centralises safety controls: requests can be limited by timeout and size, redirects can be re-validated hop by hop, and local or private IP targets can be blocked to prevent SSRF abuse. The result is a validator that works on real production URLs without browser-network limitations while still enforcing strict security boundaries for your infrastructure.

Worked examples

Valid urlset sitemap

Inputs: https://example.com/sitemap.xml

Result: Type urlset, count 124, no issues, first 50 URLs listed

Sitemap index with one bad child entry

Inputs: index with 6 child sitemaps, one missing <loc>

Result: Type sitemapindex with issue: "Sitemap entry is missing a <loc> value"

Glossary

urlset
The sitemap root element used when listing canonical page URLs directly.
sitemapindex
A sitemap root element that points to multiple child sitemap files.
loc
Required sitemap element containing the absolute URL for a page or child sitemap file.
lastmod
Optional date or datetime element indicating when a URL or sitemap was last updated.
SSRF
Server-Side Request Forgery, an attack where untrusted URLs are used to access internal network resources.

Related reading

Frequently Asked Questions

Free · No spam

Get weekly tool tips & updates

New tools, power-user tips, and productivity hacks — delivered free every Friday.

No spam, ever. Unsubscribe with one click.

Why use XML Sitemap Validator?

  • CORS-free sitemap checks through a same-origin route handler with SSRF protections
  • Detects sitemap type automatically and reports urlset versus sitemap index structure
  • Surfaces practical issues: missing loc, invalid lastmod, namespace mismatches, and size-limit risks
  • Lists child sitemap files and a preview sample of first URLs for fast QA
  • Works with public sitemap URLs without requiring third-party validation services

Common use cases

  • Validate a freshly deployed sitemap.xml before submitting it to Search Console
  • Audit a sitemap index that references multiple section-level sitemap files
  • Troubleshoot indexing delays caused by malformed lastmod values
  • Confirm your CMS output still uses the official sitemap namespace after updates
  • Spot over-limit files approaching the 50,000 URL protocol threshold

Related Developer Tools

Explore all Developer Tools.