Hreflang tester
Enter a URL — we extract its hreflang annotations and check for x-default, self-reference, and duplicates.
Common hreflang errors this checker catches
Missing return (reciprocal) links
If your English page points at the French page, the French page must point back. One-way annotations are ignored by Google — reciprocity is the core requirement of hreflang.
Invalid language or region codes
hreflang uses ISO 639-1 language codes plus optional ISO 3166-1 alpha-2 regions. "en-UK" is the classic mistake — the United Kingdom is "en-GB". Invalid codes are silently dropped.
Missing x-default
x-default tells Google which version to serve users who match none of your locales. Without it, mismatched visitors get whichever variant Google guesses.
Missing self-reference
Every page in the cluster should include an hreflang annotation pointing at itself. A missing self-reference weakens the whole cluster's annotations.
Hreflang vs. canonical conflicts
Each hreflang URL must be the canonical version of itself. If a page's canonical points elsewhere while hreflang points at the page, the signals contradict and Google usually ignores the hreflang.
The three ways to implement hreflang
Google accepts hreflang from exactly three places. Use one method per cluster — mixing them is how contradictory annotations sneak in. This checker reads the first two live (HTML head and HTTP header), so you can paste a URL and see exactly what a crawler sees.
1. HTML link tags — the default choice
One <link> per variant in the <head>, including a self-reference and an x-default:
<link rel="alternate" hreflang="en-GB" href="https://example.com/en-gb/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />2. HTTP Link header — for PDFs and other non-HTML files
Non-HTML documents have no <head>, so the annotations ride on the response header:
Link: <https://example.com/doc-en.pdf>; rel="alternate"; hreflang="en",
<https://example.com/doc-fr.pdf>; rel="alternate"; hreflang="fr"3. Sitemap annotations — for large locale sets
With 10+ locales, per-page link tags bloat every response. Declaring the cluster once per URL in the sitemap keeps pages lean:
<url>
<loc>https://example.com/en-gb/</loc>
<xhtml:link rel="alternate" hreflang="en-GB" href="https://example.com/en-gb/" />
<xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
<xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/" />
</url>FAQ
What is hreflang?
How do I check hreflang tags online?
What are the most common hreflang mistakes?
Do hreflang errors stop a page from being indexed?
Should hreflang go in the HTML, the HTTP header, or the sitemap?
Does this checker fetch the live page?
Page not indexing at all? That's not an hreflang problem — run it through the indexability checker to find the real blocker.
Related free tools
Canonical & meta finder
Extract canonical, robots meta, title, OG, and JSON-LD from a page's HTML.
Indexability checker
Check whether a live URL can be indexed by Google — status, X-Robots-Tag, meta robots, canonical, robots.txt.
Redirect chain checker
Follow every HTTP redirect hop and flag long chains and HTTPS downgrades.