Hreflang Hub
Hreflang Hub
@HreflangHub

Language via query parameter: can hreflang even work with ?lang=de

Language via query parameter: can hreflang even work with ?lang=de

Technically yes. Google accepts any fully qualified URL as an hreflang target, including ones with query strings. In practice, parameter-based localization creates so many side effects that hreflang becomes the least of your problems.

Why it is fragile:

— Parameters get reordered, stripped by CDNs, or appended with tracking codes, and every variation is a different URL to Google
— Internal links often point to the bare URL, so the localized versions receive almost no link signals
— Analytics and caching layers frequently treat the parameter as noise and serve the wrong language from cache

If you must keep parameters for now:

— Make the parameterized URL self-canonical, not canonical to the bare page
— Ensure the parameter is always first and always lowercase
— Point every hreflang alternate to the exact canonical form, including the parameter
— Block other parameter combinations from indexing

Long term, move to subdirectories. The migration is a well-understood redirect project, and every downstream system, from hreflang to caching, becomes simpler the day it ships.
Этот пост опубликован в Telegram-канале Hreflang Hub. Подписаться можно по ссылке: @HreflangHub.
tech

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

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

start

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

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

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