Hreflang Lab
Hreflang Lab
@HreflangLab

Relative URLs in hreflang: a silent cluster-killer

Relative URLs in hreflang: a silent cluster-killer

Hypothesis: a non-trivial fraction of hreflang implementations that "validate" in a linter still fail in production because they use relative paths.

The annotation <link rel="alternate" hreflang="fr" href="/fr/page" /> looks reasonable. It is not valid for hreflang. Google requires fully-qualified absolute URLs — protocol and host included: https://example.com/fr/page.

What makes this insidious:

— Relative URLs work fine for ordinary navigation, so the page appears healthy
— Many validators check syntax, not resolution, and pass relative paths silently
— The breakage is total: without a host, the crawler cannot construct the target, so the entire annotation set is effectively unusable

The fix is to template absolute URLs end to end, including protocol. Two adjacent traps we routinely find alongside this:

— Mixed http/https across the cluster, which fragments it because the URLs no longer match the canonicalized versions
— A trailing-slash inconsistency (/fr/page vs /fr/page/) that makes the hreflang target differ from the actually-indexed URL

Limitation: we can't isolate how much ranking movement absolute-URL fixes produce on their own, because they're typically bundled with broader cleanups. But mechanically, the failure is unambiguous — a relative hreflang href cannot point anywhere. Verify host presence before anything else.
Этот пост опубликован в Telegram-канале Hreflang Lab. Подписаться можно по ссылке: @HreflangLab.
tech

Свежие посты в категории «Tech Infrastructure»

Все каналы категории →

start

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

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

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