hreflang tags invalid or incomplete
Medium priorityOn-page SEO
The page’s hreflang tags use invalid codes, list a language twice, or lack a self-reference or x-default.
What triggers this issue
- Invalid language or region code, like
en-UK(should been-GB) oren_GB(needs a hyphen). - The same language listed more than once.
- No self-referencing hreflang: the page doesn’t list itself.
- No
x-defaultfor visitors who match no version.
Why it matters
hreflang tells Google which language or regional version of a page to show each searcher. Google ignores invalid values, and a set without self-references or return links may be ignored as a whole.
When it fails, your English page may rank in Germany, or your US page in the UK, with the wrong prices and spelling.
How to fix it
- Use ISO 639-1 language codes, optionally with an ISO 3166-1 region:
en,en-GB,es-MX. - On every version, list all versions including itself.
- Add an
x-defaultpointing to your main or language-selector page. - Make sure each version’s canonical points to itself, not to another language.
<link rel="alternate" hreflang="en-GB" href="https://example.com/uk/">
<link rel="alternate" hreflang="en-US" href="https://example.com/us/">
<link rel="alternate" hreflang="x-default" href="https://example.com/">