Free Hreflang Sitemap Validator — Check Annotations for Errors
Paste a sitemap.xml with hreflang annotations and this free hreflang sitemap validator checks the rules Google actually enforces — the xhtml namespace, a self-reference on every URL, reciprocal return links and valid language and region codes. No signup, nothing leaves your browser.
Paste a sitemap to check it.
What This Checks
- Valid XML and a
<urlset>root — the file has to parse before anything else can be checked - The xhtml namespace — Google's documentation requires
xmlns:xhtml="http://www.w3.org/1999/xhtml"on the root element - A self-reference — each
<url>must list every alternate version of the page, including itself - Return links — if two pages don't both point to each other, Google ignores the tags, so every alternate must list the page back
- Alternates that have their own entry — every alternate URL should appear as its own
<url>with its own annotations - Valid codes — a language code (ISO 639-1), optionally with a region (ISO 3166-1 Alpha 2), or
x-default; codes such ases-419are not supported - Duplicates and conflicts — the same hreflang value repeated, or pointing to different URLs, within one entry
- Absolute URLs — every
hrefneeds a full protocol and host
Why Sitemap Annotations Fail Quietly
Google's rule for sitemap hreflang is unforgiving: if two pages don't both point to each other, the tags are ignored. That protects your pages from anyone naming themselves as an alternative version of your content, but it also means a single missing return link silently switches off the annotation for that pair. Nothing breaks on the page, no error shows in a browser, and the wrong country version simply keeps ranking.
Sitemap annotations also get stale in a particular way. A URL changes in one language version, the sitemap generator is updated for that entry only, and the other versions now point at an address that redirects or no longer exists. Pasting the file here after any URL change catches that kind of drift before Google does.
Hreflang Sitemap Validator FAQs
Does every URL need to list itself?
Yes. Google's documentation says each <url> element must have child xhtml:link elements that list every alternate version of the page, including itself.
What happens if a return link is missing?
Google states that if two pages don't both point to each other, the tags will be ignored. The pair loses its hreflang relationship even though the markup looks fine.
Can I use hreflang in the HTML and the sitemap together?
Google says you can combine methods, but there is no benefit in Search and it is harder to manage than picking one. If both exist, they need to match exactly.
Is es-419 a valid hreflang value?
No. Google only supports ISO 639-1 language codes and ISO 3166-1 Alpha 2 region codes, and names es-419 as an example of an unsupported code.
Does this tool fetch my sitemap for me?
No. Paste the contents. Fetching another site's file from the browser is blocked by cross-origin rules for most sites, and pasting keeps your data off every server, including ours.
Does this tool store or send my data anywhere?
No. Everything is checked in your browser with JavaScript — nothing is uploaded, logged, or stored on any server, including ours.
Running SEO across several countries?
Contomatix handles full international SEO, not just hreflang checks.