SEOscanner.app

Rule · Localization

hreflang values are supported codes

SEO-I18N-04C1 Mechanism· w8

Class
C1 Mechanism
Weight
8
Severity on fail
critical
Applies to
Google

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.

  • malformed

    hreflang="{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_only

    hreflang="{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_code

    hreflang="{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.