Skip to main content
SerpGem

hreflang

An HTML attribute that tells search engines which language and regional version of a page to serve to users in specific locales.

Definition

hreflang is an HTML link attribute that specifies the language and/or regional targeting of a page. It is used by websites serving content in multiple languages or targeting different regional audiences with similar content (e.g., US English vs. UK English). Google uses hreflang to serve the most appropriate language or regional URL to users based on their browser language settings and search location.

Implementation involves adding <link rel="alternate" hreflang="x" href="..."> tags in the <head> of each page, where x is an ISO 639-1 language code (e.g., "en," "fr," "de") optionally combined with an ISO 3166-1 Alpha-2 country code (e.g., "en-US," "en-GB," "fr-FR"). Every page in a hreflang cluster must reference all other pages in the cluster, including itself (a self-referencing hreflang). An x-default value designates the fallback page for users not matching any specific locale.

hreflang solves the international duplicate content problem — without it, Google may choose the wrong version to serve or consolidate traffic onto a single URL. Common implementation errors include missing reciprocal annotations, inconsistent URL formats (HTTP vs HTTPS, trailing slash discrepancies), and incorrect language codes. Validate hreflang implementation with a dedicated hreflang checker or the hreflang tag generator before deployment.

Frequently Asked Questions

Is hreflang necessary if my site is only in English?
If you have content targeting different English-speaking regions (en-US, en-GB, en-AU) with notably different content (pricing in local currency, region-specific products), hreflang helps Google serve the right version. For purely US-audience English content with no regional variants, hreflang is not needed.
What happens if I implement hreflang incorrectly?
Google ignores malformed hreflang annotations. The most common error is missing reciprocal tags — if page A references page B via hreflang but page B doesn't reference page A back, Google ignores both. Incorrect implementation means users may continue seeing wrong language versions in their search results.