Hreflang Sitemap Validator (xhtml:link)

Checks the hreflang annotations inside sitemap XML against Google's sitemap rules.

Use the tool

Why this tool exists

Hreflang in a sitemap needs the xhtml namespace, one url element per version, and the full set of alternates in each, including the page itself. Typical errors are a missing namespace, relative hrefs, a missing self-entry or a return link that exists in only one direction. The tool lists each with the url entry it belongs to.

It reads the XML with pattern matching, not a full XML parser, so it will not catch every well-formedness error; run the file through an XML validator as well. The general sitemap checks (limits, dates) are in the Sitemap Validator.

How to use it

  1. Paste the sitemap XML.
  2. Read errors by url entry.
  3. Fix namespaces, codes and missing alternates.
  4. Re-run, then submit the sitemap.

Frequently asked questions

Is x-default checked?

Only as information.

Do both pages need to be in the same sitemap?

Return links can only be verified for pages present; others are noted.

Does it check HTTP status?

No, it cannot fetch pages.

Where are the rules from?

Google's localized versions page, read 2026-10-23.