Open source · SEO & Search

XML Sitemap Validator

Validate sitemap indexes, URLs, namespaces, dates and declared host ownership.

v0.1.0 · Node.js 22+ · MIT

Browse the public repository · View releases

A broken sitemap fails quietly. Search engines skip what they cannot parse and rarely say why, so a tree can rot for months: a lastmod of 2026-02-30 that looks like a date and is not one, a file that crept past 50,000 URLs, an index that lists itself, half the URLs pointing at a staging host after a migration.

This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+.

Run the checked-in example

node bin/xml-sitemap-validator.mjs --sitemap examples/clean/sitemap-index.xml --base-url https://example.com/sitemap-index.xml

Read the result

Without --json the same report is printed as a human-readable summary.

Scope

Also out of scope by design: no network access, no auto-fix and no writes. The tool is read-only, reads only inside --root, and an index pointing outside that directory, or back at itself, is reported rather than followed.