Hreflang Lab
Hreflang Lab
@HreflangLab

<b>The invalid-code errors that pass casual review</b>

<b>The invalid-code errors that pass casual review</b>

An audit pattern: hreflang values that look plausible to a human but are silently invalid, so Google ignores the annotation entirely while Search Console may not loudly complain.

The code structure, precisely: language must be ISO 639-1 (two letters), optional region must be ISO 3166-1 Alpha-2, joined by a hyphen, language first. <code>en-GB</code>, not <code>gb-en</code>, not <code>en_GB</code>, not <code>en-UK</code>.

The specific traps we catch repeatedly:

— <code>en-UK</code>: "UK" is not a valid region code. The country is <code>GB</code>. This one is almost universal and almost always wrong.

— <code>en-EU</code>, <code>es-LATAM</code>: the EU and Latin America are not countries; no Alpha-2 exists. There is no way to target "Europe" or "Latin America" with one region code.

— Underscore instead of hyphen (<code>en_us</code>): copied from locale strings in code. Invalid in hreflang.

— Wrong order (<code>us-en</code>): region-language is backwards.

— <code>zh-CN</code> vs script subtags: you can specify script (<code>zh-Hans</code>) per BCP-47, which is sometimes more correct than region for Chinese, but tooling support varies.

Why it's insidious: an invalid value doesn't error the whole page — Google just drops that one annotation, so a 12-language cluster quietly becomes an 11-language cluster with no obvious symptom.

Limitation: validators disagree on edge cases like script subtags and deprecated codes. When in doubt, prefer the simplest valid language-only code over a clever region guess.
Этот пост опубликован в Telegram-канале Hreflang Lab. Подписаться можно по ссылке: @HreflangLab.
start

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @dumay. Быстрый тест: $20 за канал, $1000 за пакет по сети.