Skip to content
The <head> Observatory

/static/observatorio/en/astro/hreflang/

Menu

HED-007 · Identity

<link rel="alternate" hreflang>

Introduces the page's editions in other languages — itself included.

Each line declares an edition of the page in another language or region, and hreflang="x-default" names the edition for whoever matches none. With that, search engines hand each reader the right version instead of treating the translations as rival pages.

The rule that fells most deployments is reciprocity: every version must list them all, itself included — one-way declarations are ignored. And nothing here redirects or translates: the link only declares; the indexer does the acting.

<link rel="alternate" hreflang="pt" href="https://exemplo.org/artigo/">
<link rel="alternate" hreflang="en" href="https://exemplo.org/en/artigo/">
<link rel="alternate" hreflang="x-default" href="https://exemplo.org/artigo/">
Three declarations — and every version repeats all three.