🌐
What Is Hreflang?
Hreflang is an HTML attribute used in <link rel="alternate"> tags to tell search engines which language and region a page targets. Google uses hreflang to serve the correct regional or language version of a page to users in different countries or speaking different languages. It does not directly affect rankings but prevents duplicate content issues across language versions.
📋
Hreflang Format
The hreflang attribute accepts ISO 639-1 language codes (en, fr, de) alone or combined with ISO 3166-1 alpha-2 region codes (en-US, fr-CA, pt-BR). Use language-only (en) when targeting all speakers of a language regardless of country. Use language-region (en-GB) when targeting a specific country's language variant.
⭐
What Is x-default?
The hreflang="x-default" value specifies the fallback page to show when no other language/region variant matches the user's settings. This is typically the homepage or a language-selector page. While x-default is optional, Google recommends including it for multilingual sites. It should point to your default or internationally-targeted URL.
🔁
Reciprocal Hreflang (Required)
Every hreflang annotation must be reciprocal — if page A references page B, page B must also reference page A. If your English US page references your English UK page, the English UK page must reference the English US page back. Missing reciprocal annotations cause Google to ignore the hreflang signals. Every page must include hreflang references to all its alternatives, including itself.
🔗
Three Implementation Methods
Hreflang can be implemented in three ways: (1) HTML <link rel="alternate"> tags in the <head> — most common for HTML pages; (2) HTTP Link: response headers — useful for non-HTML content like PDFs; (3) XML sitemap <xhtml:link> annotations — useful for large sites where modifying every HTML page is impractical. All three methods are equally valid according to Google.
🔒
Canonical vs Hreflang
Canonical tags tell search engines which URL is the preferred version when you have duplicate or near-duplicate content. Hreflang tells search engines which language/region each URL targets. These signals serve different purposes. A page can have both: a canonical pointing to itself (self-canonical) and hreflang annotations pointing to language/region alternatives. Never set a canonical from one language version to another — use hreflang instead.
🚫
Common Hreflang Mistakes
The most common hreflang mistakes include: missing reciprocal annotations (required), invalid language or region codes, non-absolute URLs in href attributes, duplicate hreflang values for the same language/region, missing x-default, canonical conflicts where one language version points canonical to another, inconsistent URL formatting (HTTP vs HTTPS, trailing slashes), and implementing hreflang on noindex pages.
🤖
How Google Processes Hreflang
Google uses hreflang as a hint, not a directive. Google crawls each URL in the hreflang cluster and validates the annotations. If it finds errors (invalid codes, missing reciprocal references, canonical conflicts), it may ignore the hreflang signals entirely. Googlebot must be able to crawl the URLs referenced in hreflang annotations — never block them in robots.txt. Changes may take weeks to reflect in search results.
📊
Language vs Region Targeting
Use language-only targeting (hreflang="en") when content is intended for all English speakers regardless of location. Use language-region targeting (hreflang="en-GB") when content differs between countries — for example, when prices, spelling, or content vary between UK and US audiences. You can mix both approaches: use en-US, en-GB, and a generic en as fallback if needed.