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.
- Paste a full sitemap URL such as https://example.com/sitemap.xml into the input field.
- Click Validate to fetch and parse the XML through the ToolsHub API route.
- Review the detected type, URL count, and namespace summary cards.
- Inspect the first 50 URLs and child sitemap list to confirm expected coverage.
- 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.
| Check | Expected rule | Failure example |
|---|---|---|
| Root element | urlset or sitemapindex | Custom root like <feed> |
| Namespace | http://www.sitemaps.org/schemas/sitemap/0.9 | Missing or incorrect xmlns |
| loc presence | Every entry has <loc> | URL block without loc |
| lastmod format | ISO date or datetime | Free-text date string |
| Entry limit | Maximum 50,000 entries | Single 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
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
XML Sitemap Generator
Generate a valid XML sitemap for your website. Add your URLs, set change frequency and priority, then download the sitemap.xml.
Redirect Checker
Trace the full redirect chain of any URL. See every 301, 302, 307 redirect hop, final destination, and HTTP status codes.
Open Graph Tag Generator
Generate Open Graph and Twitter Card meta tags for better social media sharing. Preview how your links will look on Facebook, Twitter, and LinkedIn.
JSON Formatter & Validator
Format, validate, and minify JSON instantly. Includes syntax highlighting, error detection, and a collapsible tree view — free, private, in-browser.
Regex Tester
Test and debug regular expressions online. See live matches, capture groups, and replace output. Free, private, instant.
Base64 Encoder & Decoder
Encode text or files to Base64, or decode Base64 strings back to text. Fast, free, and runs entirely in your browser.
Explore all Developer Tools.