Skip to content
Rankora
Free · no account needed

Hreflang Validator

Enter a URL or paste the HTML: the tool reads the hreflang tags and the Link header, checks every code and spots the classic mistakes.

Privacy and cost

This tool requests the public URL you enter from our servers. It is free, rate-limited to prevent abuse, and we do not store the URL or the page content.

How it works

  1. Enter the page URL, or paste its HTML (and its URL to check the self-reference).
  2. The tool extracts hreflang from the HTML and HTTP header, then validates each language-region code.
  3. It checks the self-reference, x-default, duplicates, absolute URLs and consistency with the canonical.

Example

On the page https://example.com/fr/, a block with fr-FR, "en-UK" and "es" with the URL "/es/" is flagged: "en-UK" is an invalid code (suggestion: en-GB), "/es/" is not an absolute URL and x-default is missing. The fr-FR self-reference is present.

What the result means

A valid hreflang set uses ISO codes (two-letter language, optional region), absolute URLs, a self-reference and ideally an x-default. This tool reads one page: return links (each target page linking back) must be checked on every target URL.

Common problems this tool helps with

  • Invalid codes such as en-UK instead of en-GB, or with an underscore (en_US).
  • A page that does not list itself among its alternates.
  • Two different URLs for the same code, or the same URL for several languages.
  • hreflang placed in the <body>, where it is ignored.

Frequently asked questions

Does the tool check return links?

No: it analyses a single page. Return links require checking each target URL; the platform's live hreflang audit is built for that.

Is x-default required?

No, but it is recommended as the fallback for users whose language has no version. The tool reports it as a warning, not an error.

Can I use hreflang with different canonical URLs?

hreflang should sit on canonical URLs and point to canonical URLs. The tool flags a canonical that differs from the page URL.