Sitemap Validator
Validate any XML sitemap instantly. Detect syntax errors, broken URLs, indexing issues, and SEO problems affecting crawl efficiency and rankings.
About Sitemap Validator
Paste any XML sitemap URL to instantly validate its structure, catch syntax errors, and identify configuration issues before they silently damage your crawl efficiency and indexation. No login. No cost. No limits.
What Is a Sitemap Validator?
A sitemap validator fetches a live XML sitemap. It runs a full structural diagnostic, parsing every element against the official sitemap protocol specification, flagging syntax errors, validating tag usage, and identifying configuration issues that prevent Google and other search engines from processing the file correctly.
For SEO professionals, sitemap validation is a routine audit step that consistently surfaces high-impact issues. A malformed XML declaration, an invalid namespace, an oversized file, or contradictory tag configurations can cause Google to partially or entirely fail to process a sitemap without any visible error in Search Console beyond a vague parsing warning. This tool exposes exactly what is wrong and where, so fixes are immediate rather than speculative.
How to Use This Tool
Step 1: Enter the Sitemap URL: Paste the direct URL of any XML sitemap or sitemap index file (e.g. yourdomain.com/sitemap.xml). Sub-sitemaps can be tested individually.
Step 2: Click Validate Sitemap: The tool fetches the live file and runs a full structural and configuration diagnostic against the sitemap protocol specification.
Step 3: Review the Results: Every detected issue is reported with its location in the file and a clear explanation, so you can fix the exact problem rather than auditing the file manually line by line.
What This Tool Validates
XML Syntax & Document Structure: Parses the full file for well-formedness, unclosed tags, illegal characters, incorrect nesting, missing declarations, and encoding issues. A single XML syntax error causes the entire sitemap to fail parsing. Google will log a processing error in GSC, but won't tell you which line broke the file. This tool does.
Namespace Declaration: Validates that the correct sitemap protocol namespace is declared on the root element: xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" A missing or incorrect namespace causes the file to be treated as invalid XML by compliant parsers, including Google's sitemap processor.
Root Element Validation: Confirms the correct root element is in use <urlset> for standard sitemaps, <sitemapindex> for sitemap index files. Flags files that use the wrong root element for their content type or mix both in a single file.
Required Tag Presence: Every <url> block must contain a <loc> element. Missing <loc> tags are flagged per entry. The tool also verifies that <sitemap> entries within index files contain valid <loc> references to child sitemaps.
<loc> URL Format Validation: Validates that every <loc> value is an absolute URL, correctly encoded in UTF-8, and free of characters that break XML parsing, unencoded ampersands (& instead of &), spaces, and non-ASCII characters that haven't been properly percent-encoded. Unencoded ampersands are the single most common <loc> error found in real-world sitemaps.
lastmod Format Validation: Validates that all lastmod values conform to ISO 8601 format, either YYYY-MM-DD or the full datetime variant YYYY-MM-DDThh:mm:ss+00:00. Flags incorrectly formatted dates, future-dated values, and inconsistent formatting across entries, all of which degrade the reliability of lastmod as a crawl prioritisation signal.
changefreq Value Validation: Confirms that all changefreq values use only the accepted terms defined in the sitemap protocol: always, hourly, daily, weekly, monthly, yearly, never. Custom or misspelled values are flagged. Note: Google treats changefreq as an advisory hint and frequently ignores it. Validation ensures the tag doesn't introduce a parsing issue, even if its SEO impact is limited.
Priority Value Validation: Validates that all priority values fall within the accepted 0.0–1.0 range and use correct decimal formatting. Out-of-range values and non-numeric entries are flagged. Like changefreq, Google uses priority as a hint rather than an instruction, but invalid values can still cause parsing issues.
Sitemap Size & URL Count Limits: Checks total URL count and estimated file size against Google's sitemap limits of 50,000 URLs and 50MB uncompressed per file. Flags sitemaps approaching or exceeding either limit and confirms whether gzip compression is in use, which is recommended for large sitemaps.
Sitemap Index Structure Validation: For sitemap index files, validates that every <sitemap> entry contains a valid <loc> pointing to a child sitemap, that the <sitemapindex> namespace is correctly declared, and that no URL entries are mixed into an index file (which should only reference child sitemaps, not individual page URLs).
HTTP Status of the Sitemap File Itself: Reports the HTTP status code returned by the sitemap URL. A sitemap returning a 404 is not processed by Google. A sitemap behind a redirect should be submitted to GSC using its final destination URL, not the redirect source. A 500 error on the sitemap URL prevents it from being fetched entirely.
XML Sitemap Tags: Quick Reference
| Tag | Required | Valid Values | Notes |
| <urlset> | Yes | Root element; must include namespace declaration | |
| <sitemapindex> | Yes (index files) | Root element for index files; must include namespace | |
| <url> | Yes | Wraps each page entry in standard sitemaps | |
| <loc> | Yes | Absolute URL, UTF-8 | Must be a canonical, final-destination URL; encode special characters |
| <lastmod> | Optional | ISO 8601 date/datetime | Inaccurate values reduce crawl prioritisation benefit |
| <changefreq> | Optional | always / hourly / daily / weekly / monthly / yearly / never | Advisory only; Google frequently ignores |
| <priority> | Optional | 0.0 – 1.0 | Advisory only; relative to other URLs on the same domain |
| <sitemap> | Yes (index) | Wraps each child's sitemap reference in index files |
Common XML Sitemap Configuration Issues
Unencoded Ampersands in <loc> URLs: The most frequently occurring XML error in real-world sitemaps. URLs containing query parameters with multiple values (e.g. ?type=a&colour=blue) must encode the ampersand as & in XML. An unencoded character makes the file invalid XML and can cause the entire sitemap to fail processing.
Incorrect or Missing Namespace: The xmlns attribute on <urlset> or <sitemapindex> must exactly match the sitemap protocol namespace. A typo, a missing declaration, or an outdated namespace URL causes the file to be treated as invalid by compliant XML parsers.
Sitemap Exceeding 50,000 URL Limit: Google rejects sitemaps exceeding 50,000 URLs with a processing error in GSC. The fix is a sitemap index structure split URLs across multiple child sitemaps and references them from a single <sitemapindex> file. Segmenting by content type (products, categories, posts) also improves indexation monitoring per segment.
Mixed Content in Sitemap Index Files: A sitemap index file should only contain <sitemap> entries referencing child sitemaps, not <url> entries for individual pages. Mixing both in a single file is a structural violation that causes processing errors.
Inaccurate lastmod Dates: CMS platforms that auto-update lastmod to the current date on every sitemap regeneration, regardless of actual content changes, train Googlebot to distrust the signal over time. Once Google determines lastmod values are unreliable, it stops using them for crawl prioritisation, removing one of the few mechanisms available to steer Googlebot toward recently updated content. Only update lastmod when content genuinely changes.
Future-Dated Lastmod Values: A lastmod date set in the future is technically invalid and signals to Google that the sitemap is auto-generated without meaningful date logic. Audit for future dates after any CMS migration or sitemap plugin change.
Sitemap Not Declared in robots.txt: While not an XML error, a sitemap not declared via the Sitemap: directive in robots.txt misses an important discovery mechanism. Any crawler, not just those with GSC access, can discover and process a sitemap declared in robots.txt. Always include it.
Sitemap URL Submitted to GSC Is a Redirect: If the URL submitted to Google Search Console returns a 301 or 302, GSC will follow the redirect but flag it as an issue. The canonical, final-destination URL of the sitemap should always be what is submitted directly.
More Tools
Frequently Asked Questions About Sitemap Validator
Is this sitemap validator free?
Yes, no login, no account, no usage limits.
What causes a sitemap to fail processing in Google Search Console?
The most common causes are XML syntax errors (including unencoded ampersands), an incorrect or missing namespace declaration, file size exceeding 50MB, and URL count exceeding 50,000. This tool detects all of these.
What is the difference between a sitemap and a sitemap index file?
A standard sitemap (<urlset>) lists individual page URLs. A sitemap index file (<sitemapindex>) lists references to multiple child sitemaps. Large sites use a sitemap index to stay within the 50,000 URLs per file limit and segment sitemaps by content type.
Does Google index every URL listed in a sitemap?
No. Sitemap inclusion is a crawl suggestion, not an indexation guarantee. Google evaluates each URL independently based on content quality, canonicalisation, duplication, and site authority.
Should lastmod always be included?
Only if it can be kept accurate. An inaccurate lastmod that doesn't reflect genuine content changes actively degrades crawl prioritisation over time. If your CMS cannot reliably track content change dates, omit lastmod rather than populate it inaccurately.
Does Google use changefreq and priority?
Both are treated as advisory hints and are frequently ignored. Accurate lastmod data has a significantly more practical impact on crawl prioritisation. Validate these tags to avoid parsing issues, but don't invest in fine-tuning their values.
Can I validate a competitor's sitemap?
Yes, any publicly accessible sitemap URL can be validated.
How large can a sitemap file be?
50,000 URLs or 50MB uncompressed, whichever is reached first. Use gzip compression for large files and a sitemap index structure for sites exceeding the URL limit.