Skip to content

Ready

Enter a domain on the left and run the test. Results stream in here.

Testing a live page and every alternate it names

Hreflang mistakes do not show up in a browser. The page looks fine; Google just quietly ignores the tags and shows the wrong language version, or none, in some markets. This hreflang checker (also called a hreflang validator or tester) fetches the URL you enter, reads every link rel="alternate" hreflang tag in its HTML head, checks the codes and URLs, and then fetches up to 15 of the alternate pages to confirm each one loads and links back.

It reads hreflang from the HTML only. If your site declares alternates in an XML sitemap or in HTTP headers, this tool will report no tags for the page; that is expected, and the sitemap version needs checking separately. To write correct tags in the first place, use the Hreflang Tags Generator.

Checks on the page you entered

Status code

The page itself must return 200. Hreflang on a page that redirects or errors is not used.

Valid and plausible codes

Each value must be an ISO 639-1 language code with an optional region (en, en-GB, es-419), or x-default. The tool rejects malformed values such as en_US and flags well-formed codes that are almost certainly wrong: country codes used as languages (jp for Japanese, cn for Chinese, dk for Danish), en-UK instead of en-GB, and EU as a region, which is not a country.

Duplicate codes

The same code pointing to two different URLs leaves Google unable to choose. Each code should appear once.

Absolute URLs, self-reference and x-default

Google asks for fully qualified URLs, so relative hrefs are flagged. The page should list itself in its own set. A missing x-default is reported as information only, since it is recommended rather than required.

Canonical and noindex conflicts

If the page's canonical points to a different URL, Google treats that other URL as the one to index and the hreflang on this page is unlikely to be used. A page with noindex cannot appear in results, so its hreflang has no effect either.

Checks on the alternates

For each alternate URL (up to 15, de-duplicated), the validator requests the page, records its status and whether it redirected, and reads its own hreflang tags to see whether it points back to the page you tested. It reports three kinds of failure: alternates that do not load (an error or a 4xx/5xx status), alternates that redirect (use the final URL in the tag instead), and alternates that load but do not link back.

That last one, the missing return link, is the most common hreflang failure on real sites. It usually happens when a new language is added and only the new pages get the full set, or when one template outputs tags and another does not. Without the return link, Google ignores that pair.

A broken head section, and the corrected one

<!-- On https://example.com/fr/ (the page you tested) -->
<link rel="canonical" href="https://example.com/" />            <!-- canonical points away -->
<link rel="alternate" hreflang="fr_FR" href="https://example.com/fr/" />   <!-- underscore -->
<link rel="alternate" hreflang="en-UK" href="/uk/" />                   <!-- UK + relative -->
<link rel="alternate" hreflang="jp" href="https://example.com/ja/" />      <!-- jp is a country -->

<!-- Fixed -->
<link rel="canonical" href="https://example.com/fr/" />
<link rel="alternate" hreflang="fr-FR" href="https://example.com/fr/" />
<link rel="alternate" hreflang="en-GB" href="https://example.com/uk/" />
<link rel="alternate" hreflang="ja" href="https://example.com/ja/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />

Four problems in five lines: a canonical that points to the English homepage, an underscore in fr_FR, the invalid region UK combined with a relative URL, and jp used as a language. The fixed version uses a self-referencing canonical, valid codes, absolute URLs and adds an x-default. Remember the same full block, including the page's own line, must appear on every alternate.

Where the fix usually lives on each platform

WordPress with WPML or Polylang

Missing return links usually mean a translation is not linked to its original in the plugin. Open the post, check the language panel and connect the translations. Codes come from the plugin's language settings; set the locale there (for example en_GB internally becomes en-GB in the tag).

Shopify Markets

Shopify generates hreflang from your markets and languages. If codes look wrong, check the market's languages and domains. Avoid adding manual hreflang in theme.liquid on top of what Markets outputs.

Custom builds

Generate the hreflang set from one shared list of locales and URLs used by every template, so a page can never list alternates that do not list it back. Build the canonical from the current locale's URL, not the default one.

Clean report, wrong pages in Google?

A passing result means the tags on this page and its alternates are consistent. Google still treats hreflang as a signal, not a command. If the wrong version keeps appearing, use Search Console's URL Inspection tool on the alternate to see whether it is indexed and which canonical Google selected; an alternate Google has folded into another URL cannot be shown. Also check that each version is genuinely localised (language, currency, contact details), since thin or untranslated alternates are more likely to be treated as duplicates.

Our hreflang and international SEO guide covers the strategy side.

A repeatable validation routine

Test one URL from each language template, not just the homepage, since templates fail independently. Fix critical issues (invalid codes, unreachable alternates, missing return links) first, then warnings. Re-run after every release that adds a locale, changes URL patterns or adds redirects. The validator fetches up to 15 alternates per run, so if a cluster has more versions than that, also test some of the later-listed alternates directly to cover the rest of the set.

How it works

  1. Enter the URL to Validate

    Paste the URL of a page with hreflang tags. We fetch it and read the hreflang link tags in its HTML head, plus its canonical and robots meta.

  2. Check Codes and Return Links

    We validate every code and URL, then fetch up to 15 alternates to confirm each one loads, does not redirect and links back to this page.

  3. Review Issues with Fixes

    Get a report of invalid codes, missing return links, unreachable or redirecting alternates, canonical and noindex conflicts, and x-default status, each with a fix.

Frequently asked

What does this validator check?

›

On the page you enter: that it returns 200, that every hreflang code is valid and plausible, that no code points to two URLs, that URLs are absolute, that the page lists itself, whether x-default is present, and whether a canonical pointing elsewhere or a noindex cancels the tags. It then fetches up to 15 alternates and checks that each loads, does not redirect and links back.

What are the most common hreflang errors?

›

Missing return links (page A lists page B but B does not list A), canonicals on translations that point to the main-language page, invalid codes such as en_US, en-UK or jp, relative URLs, and alternates that redirect or return errors. A missing x-default is not an error, only a recommendation.

What happens if hreflang return tags are missing?

›

Google ignores that pair of annotations, so it may show the wrong language version in that market. Other pairs in the set that are confirmed in both directions can still work. Fix it by pasting the full, identical hreflang block, including the self-reference, into every version.

What language codes are valid?

›

An ISO 639-1 language code (en, es, de), optionally followed by a hyphen and an ISO 3166-1 alpha-2 region (en-GB, es-MX) or the UN code 419 for Latin America (es-419), plus the special value x-default. Common mistakes are underscores (en_US), country codes used as languages (jp for ja), and en-UK, which should be en-GB.

Can hreflang and canonical conflict?

›

Yes. If your /es/ page's canonical points to the /en/ page, Google treats the English page as the one to index and the Spanish page's hreflang is unlikely to be used. Each language version should have a self-referencing canonical. The validator flags a canonical that points away from the tested page.

Does this tool read hreflang from my XML sitemap or HTTP headers?

›

No. It reads link tags in the page's HTML head. If you declare alternates only in a sitemap or Link headers, the tool will report no tags for that page, which is expected. The sitemap version needs to be checked separately.

Should I use hreflang or canonical for language versions?

›

Hreflang. A canonical says 'these are duplicates, index only one', which hides your translations. Hreflang says 'these are alternatives for different audiences', so each version can be indexed and shown to the right searchers. Use canonicals only within one language, for example for parameter URLs.

Does hreflang matter for a single-language site?

›

No. If you have one version of each page for one audience, hreflang has nothing to connect and you can skip it. It only matters once you publish the same content for more than one language or region.

Related tools

More Technical SEO tools

See all Technical SEO tools · All free SEO tools

Related guides

↳ full site audit190+ checks · AI fix instructions · yearly plans