- Class
- C1 Mechanism
- Weight
- 8
- Severity on fail
- critical
- Applies to
Test this rule on a live site with the hreflang checker. Free, no account needed.
Scope and evidence
Evaluated on pages in P with annotations. The book marks this requirement SEARCH-ENGINE-SPECIFIC.
{condition_label} is "not a valid code format", "a region code without a language", or "a code outside ISO 639-1, ISO 15924 or ISO 3166-1 Alpha 2". The order of checks is fixed in §3.9.
Fail conditions
Each condition has a stable code and a reason template. The evaluator fills the placeholders from observed values only; no sentence in a report is generated.
malformedhreflang="{code}" on {url} is not a supported value ({condition_label}). Google supports ISO 639-1 language codes, optionally with an ISO 15924 script and an ISO 3166-1 Alpha 2 region, plus x-default, and ignores other codes.
region_onlyhreflang="{code}" on {url} is not a supported value ({condition_label}). Google supports ISO 639-1 language codes, optionally with an ISO 15924 script and an ISO 3166-1 Alpha 2 region, plus x-default, and ignores other codes.
unsupported_codehreflang="{code}" on {url} is not a supported value ({condition_label}). Google supports ISO 639-1 language codes, optionally with an ISO 15924 script and an ISO 3166-1 Alpha 2 region, plus x-default, and ignores other codes.
The documented fix
Use, for example, en, en-GB (not en-UK), es or es-MX (not es-419), zh-Hant.
Sources, quoted
These are the passages the rule rests on, stored once in the knowledge base and emitted exactly as written. A citation marked for specific conditions appears only on findings with those codes.
“Only language codes listed in ISO 639-1 and region codes listed in ISO 3166-1 Alpha 2 are supported; other codes that aren't listed in those standards, such as es-419, aren't supported.”
[G-HREFLANG] Tell Google about localized versions of your page · Supported language and region codes · last updated 2026-09-21
https://developers.google.com/search/docs/specialty/international/localized-versions“You can't specify the country code by itself.”
[G-HREFLANG] Tell Google about localized versions of your page · Supported language and region codes · last updated 2026-09-21
https://developers.google.com/search/docs/specialty/international/localized-versions“doesn't have an effect on Google Search”
[G-HREFLANG] Tell Google about localized versions of your page · Common mistakes · last updated 2026-09-21
https://developers.google.com/search/docs/specialty/international/localized-versions