Technical

Hreflang

Hreflang is an HTML attribute that specifies the language and optional geographic targeting of a page, helping search engines serve the correct version to users in different regions.

Implement hreflang when you have the same content in multiple languages or target the same language in different regions (en-US vs en-GB). Use `<link rel="alternate" hreflang="xx" href="...">` tags in the head, or specify them in your sitemap.

Every hreflang set must include a self-referencing tag and an `x-default` fallback. The annotations must be reciprocal — if page A references page B, page B must reference page A.

Common mistakes: non-reciprocal annotations, incorrect language codes, pointing hreflang to redirecting URLs, and missing the x-default tag. These errors can cause Google to ignore your hreflang entirely.

Example

<!-- In the <head> of the English page -->
<link rel="alternate" hreflang="en" href="https://example.com/en/page" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/page" />
<link rel="alternate" hreflang="x-default" href="https://example.com/page" />

Stop shipping broken SEO

Indxel validates your metadata, guards your CI/CD pipeline, and monitors indexation — so you never miss an SEO issue again.