Hreflang Codes
Language and region codes for hreflang, with mistakes to avoid.
About Hreflang codes
An hreflang value tells search engines which language, and optionally which country, a page is for. It starts with a two-letter ISO 639-1 language code such as en, de or ja, optionally followed by a hyphen and a two-letter ISO 3166-1 alpha-2 region code such as GB, CH or JP. Google also accepts an ISO 15924 script code for languages written in more than one script, such as zh-Hans and zh-Hant, and the special value x-default for the page to show when nothing else matches.
Most hreflang problems come from a few mistakes: using UK instead of GB, a region code on its own, underscores instead of hyphens, codes Google doesn't support such as es-419, and annotations that only point one way. Every page in a set must list every other page and itself, with absolute URLs to indexable pages that return 200. Codes are not case-sensitive, but the convention is lowercase languages and uppercase regions.
114 entries
Example values
| hreflang | Means |
|---|---|
| en | English, for users anywhere |
| en-GB | English, for users in the United Kingdom |
| en-US | English, for users in the United States |
| es-MX | Spanish, for users in Mexico |
| de-CH | German, for users in Switzerland |
| fr-CA | French, for users in Canada |
| pt-BR | Portuguese, for users in Brazil |
| zh-Hans | Chinese in Simplified script (ISO 15924 script code) |
| zh-Hant-TW | Chinese in Traditional script, for users in Taiwan |
| x-default | The fallback page when no other language or region matches, such as a language picker |
Common mistakes
| Wrong | Right | Why |
|---|---|---|
| en-UK | en-GB | The ISO 3166-1 code for the United Kingdom is GB. UK isn't a valid region code. |
| GB | en-GB | A region on its own isn't allowed: the language always comes first. |
| en_US | en-US | Separate the parts with a hyphen, not an underscore. |
| eu, es-419 | A list of country codes | Google only supports ISO 3166-1 alpha-2 regions, so EU and UN M.49 codes such as 419 (Latin America) aren't supported. |
| jp | ja (Japanese) | jp is the country code for Japan. The language code is ja; ja-JP is language plus region. |
| One-way annotations | Links in both directions | If page A lists page B, page B must list page A, or the annotations may be ignored. |
| Missing self-reference | Each page lists itself too | Every version should include a link to itself alongside the others. |
| Relative URLs | Absolute URLs | Use the full URL with protocol and domain, for example https://example.com/de/. |
| Pointing at redirects or noindex pages | The final, indexable URL | Each URL should return 200 and be the canonical version of that page. |
Language codes (ISO 639-1)
The first part of every hreflang value.
| Code | Language |
|---|---|
| ar | Arabic |
| bg | Bulgarian |
| bn | Bengali |
| ca | Catalan |
| cs | Czech |
| cy | Welsh |
| da | Danish |
| de | German |
| el | Greek |
| en | English |
| es | Spanish |
| et | Estonian |
| fa | Persian |
| fi | Finnish |
| fr | French |
| ga | Irish |
| he | Hebrew |
| hi | Hindi |
| hr | Croatian |
| hu | Hungarian |
| id | Indonesian |
| is | Icelandic |
| it | Italian |
| ja | Japanese |
| ko | Korean |
| lt | Lithuanian |
| lv | Latvian |
| ms | Malay |
| mt | Maltese |
| nb | Norwegian Bokmål |
| nl | Dutch |
| no | Norwegian |
| pl | Polish |
| pt | Portuguese |
| ro | Romanian |
| ru | Russian |
| sk | Slovak |
| sl | Slovenian |
| sr | Serbian |
| sv | Swedish |
| sw | Swahili |
| ta | Tamil |
| th | Thai |
| tr | Turkish |
| uk | Ukrainian |
| ur | Urdu |
| vi | Vietnamese |
| zh | Chinese |
Region codes (ISO 3166-1 alpha-2)
Optional second part, after a hyphen.
| Code | Country or region |
|---|---|
| AE | United Arab Emirates |
| AR | Argentina |
| AT | Austria |
| AU | Australia |
| BE | Belgium |
| BR | Brazil |
| CA | Canada |
| CH | Switzerland |
| CL | Chile |
| CN | China |
| CO | Colombia |
| CZ | Czechia |
| DE | Germany |
| DK | Denmark |
| EG | Egypt |
| ES | Spain |
| FI | Finland |
| FR | France |
| GB | United Kingdom (not UK) |
| GR | Greece |
| HK | Hong Kong |
| IE | Ireland |
| IL | Israel |
| IN | India |
| IT | Italy |
| JP | Japan |
| KR | South Korea |
| MX | Mexico |
| MY | Malaysia |
| NL | Netherlands |
| NO | Norway |
| NZ | New Zealand |
| PE | Peru |
| PH | Philippines |
| PL | Poland |
| PT | Portugal |
| RO | Romania |
| SA | Saudi Arabia |
| SE | Sweden |
| SG | Singapore |
| TH | Thailand |
| TR | Türkiye |
| TW | Taiwan |
| UA | Ukraine |
| US | United States |
| VN | Vietnam |
| ZA | South Africa |
Good to know
Three ways to add hreflang
Link elements in the HTML head, Link HTTP headers (useful for PDFs), or xhtml:link entries in an XML sitemap. Pick one method per set of pages; mixing them makes errors harder to find.
Hreflang isn't for ranking
hreflang helps Google show the right version to the right user. It doesn't make a page rank higher, and Google may still show another version if it judges it a better match.
More references
- Meta tags cheat sheetWhich meta tags Google uses and which it ignores
- Robots meta directivesnoindex, nosnippet, max-snippet and X-Robots-Tag
- Schema types for rich resultsGoogle's rich result types and their required properties
- HTTP status codes for SEOHow Google treats 2xx, 3xx, 4xx and 5xx responses
- AI crawler user agentsGPTBot, ClaudeBot, Google-Extended and other AI bots
- SEO glossary71 SEO terms explained in plain English