An hreflang value is a two-letter ISO 639-1 language code (for example fr), optionally followed by a hyphen and a two-letter ISO 3166-1 alpha-2 region code (for example fr-CA for French speakers in Canada). The language always comes first, a region can never be used on its own, and the reserved value x-default marks the fallback page. Google does not support other code systems, so UN M.49 area codes such as es-419 for Latin American Spanish are ignored.
Conclusiones clave
- Format:
languageolanguage-REGION, e.g.de,de-AT,pt-BR. Case does not matter to Google, but lowercase language and uppercase region is the convention. - Use ISO 639-1 for the language and ISO 3166-1 alpha-2 for the region. Nothing else is supported, including
es-419,en-UKyen-EU. - A script subtag from ISO 15924 is allowed when you need it:
zh-Hans,zh-Hant,sr-Latn. - Every page in a set must list itself and all its alternates, and each alternate must link back.
- Agregar
x-defaultfor the page you want people to see when no listed language or region matches.
The full lists of valid language codes and region codes are further down this page. The rules come from Google’s own documentation, Tell Google about localized versions of your page, which Google last updated on 21 September 2026.
How an hreflang code is built
An hreflang value has up to three parts, separated by hyphens:
| Part | Standard | Required? | Ejemplos |
|---|---|---|---|
| Idioma | ISO 639-1 (two letters) | Yes, always first | en, es, ja, ar |
| Guión | ISO 15924 (four letters) | Optional | Hans, Hant, Latn, Cyrl |
| Región | ISO 3166-1 alpha-2 (two letters) | Optional | US, GB, MX, BR |
So all of these are valid: en, en-GB, zh-Hant, zh-Hant-TW, sr-Latn. The first part must be a language. As Google’s documentation puts it, you can’t specify the country code by itself. Its example is Belgium: nl-BE (Dutch for users in Belgium) and de-BE (German for users in Belgium) are correct, while be on its own means Belarusian, not Belgium.
Google also says the value is case-insensitive. en-gb, EN-GB y en-GB all work. Most teams write the language in lowercase and the region in uppercase because that is how the ISO lists print them, and it makes mistakes easier to spot in code review.
Language-only or language plus region?
Utilice un language-only code (es) when one page serves every speaker of that language, wherever they live. Most sites translated with a website translation tool fall into this group: one Spanish version, one German version, and so on.
Añadir un region (es-MX, es-ES) only when you really have different pages for different countries. Good reasons are different prices or currencies, different shipping and legal text, or deliberately different wording (for example pt-BR y pt-PT, o en-US y en-GB with local spelling and prices).
You can mix both. A common pattern is a generic page plus regional exceptions:
<link rel="alternate" hreflang="es" href="https://example.com/es/" />
<link rel="alternate" hreflang="es-MX" href="https://example.com/es-mx/" />
<link rel="alternate" hreflang="en" href="https://example.com/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />A searcher in Mexico gets the es-MX page; a Spanish speaker in Chile, Spain or the US gets the generic es página.
What about Latin American Spanish (es-419)?
This is the most common question about hreflang codes, and the answer is short: Google does not support es-419. Its documentation names it as the example of an unsupported code, because 419 is a UN M.49 area code (“Latin America and the Caribbean”), not an ISO 3166-1 country code. The same applies to other M.49 numbers such as 150 (Europe).
If you have one Latin American Spanish page, you have two workable options:
- Mark it as plain
es. If you have no separate Spain version, this is the simplest choice and covers every Spanish speaker. - List the countries individually. If you also have a Spain page (
es-ES), point several country codes at the same Latin American URL:es-MX,es-AR,es-CO,es-CL,es-PEand so on. One URL can carry several hreflang values.
The same thinking applies to French for Africa, Arabic for the Gulf, or “English for Europe”: there are no supported region groups, so use the language alone or list the countries.
x-default: the fallback value
x-default is not a language. It is a reserved value that Google uses “when no other language/region matches the user’s browser setting”. Point it at a language selector page or at your main version:
<link rel="alternate" hreflang="x-default" href="https://example.com/" />It is optional, but it is worth adding. Without it, a visitor whose language you don’t cover gets whichever version Google picks.
Where the code goes: three ways to implement hreflang
Google accepts hreflang in three places. Pick one method per page; you don’t need all three.
1. HTML <link> etiquetas en el <head>
<link rel="alternate" hreflang="en" href="https://example.com/pricing" />
<link rel="alternate" hreflang="de" href="https://example.com/de/pricing" />
<link rel="alternate" hreflang="fr-CA" href="https://example.com/fr-ca/pricing" />
<link rel="alternate" hreflang="x-default" href="https://example.com/pricing" />2. HTTP Link headers (useful for PDFs and other non-HTML files)
Link: <https://example.com/guide.pdf>; rel="alternate"; hreflang="en",
<https://example.com/de/guide.pdf>; rel="alternate"; hreflang="de"3. XML sitemap entries
<url>
<loc>https://example.com/pricing</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/pricing" />
<xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/pricing" />
</url>Whichever you choose, three rules from Google’s documentation apply:
- Each version lists itself and every other version. The set on the German page is the same as the set on the English page.
- Links must be reciprocal. If page X points to page Y, page Y must point back to X, or the annotation can be ignored.
- URLs must be fully qualified, including
https://./de/pricingo//example.com/de/pricingare not accepted.
For a full walk-through of the implementation itself, including canonicals and testing, see our Guía completa de Hreflang and the explainer on etiquetas hreflang autorreferenciales.
The most common hreflang code mistakes
Most broken hreflang sets we see come down to a handful of wrong codes. Several of them are valid codes that simply mean something else, so validators don’t always flag them.
| Written | Lo que realmente significa | Use instead |
|---|---|---|
en-UK | Nothing: UK is not an ISO 3166-1 code | en-GB |
es-LA | Spanish for Laos (LA is Laos) | es, or individual countries |
es-419 | Unsupported (UN M.49 area code) | es, or individual countries |
en-EU | Nothing: EU is not a country code | en, or individual countries |
jp | Nothing: not a language code | ja (Japanese) |
cn | Nothing: not a language code | zh (Chinese), zh-CN for China |
kr | Kanuri, a language spoken around Lake Chad | ko (Korean) |
se | Northern Sami | sv (Swedish) |
dk, cz, gr, ua | Not language codes | da, cs, el, uk |
uk meaning “UK English” | Ucranio | en-GB |
be meaning Belgium | Belarusian | nl-BE, fr-BE, de-BE |
in, iw | Old, withdrawn codes | id (Indonesian), he (Hebrew) |
fil | Three-letter code, not in ISO 639-1 | tl is the ISO 639-1 code for Tagalog |
The pattern behind most of these: people type the country code where the language code belongs. Japan is JP but Japanese is ja; Sweden is SE but Swedish is sv; Denmark is DK but Danish is da.
Other frequent problems are not about the codes at all: missing return links, relative URLs, hreflang pointing to a URL that redirects or is blocked, and a canonical tag that points every language version to the English page. Our article on the no-return-tags error covers how to fix those.
Chinese, Serbian and other languages with more than one script
Some languages are written in more than one script, and the script matters more than the country.
- Chinese. Uso
zh-Hansfor Simplified andzh-Hantfor Traditional if your pages differ by script rather than by country. If they are country-specific,zh-CN,zh-TWyzh-HKwork too; Google notes that withzh-TWthe script (Traditional) is derived from the region. You can be explicit withzh-Hant-TW. - Serbian.
sr-Latnysr-Cyrlseparate the Latin and Cyrillic versions. - Norwegian. ISO 639-1 has
no(Norwegian),nb(Bokmål) andnn(Nynorsk). Most Norwegian websites are in Bokmål; use whichever code matches the text and stay consistent.
Common language and region combinations
These are the combinations most multilingual sites need. All are valid under Google’s rules.
| Audiencia | hreflang |
|---|---|
| English, any country | en |
| English, United States / United Kingdom / Canada / Australia | en-US / en-GB / en-CA / en-AU |
| Spanish, any country | es |
| Spanish, Spain / Mexico / Argentina | es-ES / es-MX / es-AR |
| Portuguese, Brazil / Portugal | pt-BR / pt-PT |
| French, France / Canada / Belgium / Switzerland | fr-FR / fr-CA / fr-BE / fr-CH |
| German, Germany / Austria / Switzerland | de-DE / de-AT / de-CH |
| Chinese, Simplified / Traditional | zh-Hans / zh-Hant |
| Chinese, China / Taiwan / Hong Kong | zh-CN / zh-TW / zh-HK |
| Japanese / Korean | ja / ko |
| Arabic, any country / Saudi Arabia / UAE | ar / ar-SA / ar-AE |
| Hindi / Indonesian / Vietnamese / Thai | hi / id / vi / th |
| Ukrainian / Polish / Turkish / Dutch | uk / pl / tr / nl |
| Fallback for everyone else | x-default |
How ConveyThis sets hreflang codes for you
If you translate your site with ConveyThis, you don’t write these tags by hand. When you use a subdomain or subfolder URL structure, ConveyThis adds hreflang tags for every language you publish, using the correct language codes, together with translated page titles and meta descriptions. That removes the two errors behind most broken sets: wrong codes and missing return links. You can read what else it handles on the página de SEO multilingüe, y el Guía de estructura de URL explains which structure to pick and which plans include it. Subdomains and subfolders are available from the Business plan; see Precios for the details.
If you build hreflang yourself, the reference lists below are the only codes you need.
Complete list of hreflang language codes (ISO 639-1)
All 183 two-letter codes in ISO 639-1, as published by the Library of Congress, the ISO 639-2 registration authority. Any of them can be the first part of an hreflang value. Where a code has several names, they are separated by a slash.
| Idioma | hreflang code |
|---|---|
| Abkhazian | ab |
| Afar | aa |
| Afrikaans | af |
| Akan | ak |
| Albanian | sq |
| Amharic | am |
| Arábica | ar |
| Aragonese | an |
| Armenian | hy |
| Assamese | as |
| Avaric | av |
| Avestan | ae |
| Aymara | ay |
| Azerbaijani | az |
| Bambara | bm |
| Bashkir | ba |
| Basque | eu |
| Belarusian | be |
| Bengali | bn |
| Bislama | bi |
| Bosnian | bs |
| Breton | br |
| Bulgarian | bg |
| Burmese | my |
| Catalan / Valencian | ca |
| Central Khmer | km |
| Chamorro | ch |
| Chechen | ce |
| Chichewa / Chewa / Nyanja | ny |
| Chino | zh |
| Church Slavic / Old Slavonic / Church Slavonic / Old Bulgarian / Old Church Slavonic | cu |
| Chuvash | cv |
| Cornish | kw |
| Corsican | co |
| Cree | cr |
| Croata | hr |
| Checo | cs |
| Danés | da |
| Divehi / Dhivehi / Maldivian | dv |
| Dutch / Flemish | nl |
| Dzongkha | dz |
| Inglés | en |
| Esperanto | eo |
| Estonian | et |
| Ewe | ee |
| Faroese | fo |
| Fijian | fj |
| Finnish | fi |
| Francés | fr |
| Fulah | ff |
| Gaelic / Scottish Gaelic | gd |
| Galician | gl |
| Ganda | lg |
| Georgian | ka |
| Alemán | de |
| Greek (modern) | el |
| Guarani | gn |
| Gujarati | gu |
| Haitian / Haitian Creole | ht |
| Hausa | ha |
| Hebreo | he |
| Herero | hz |
| Hindi | hi |
| Hiri Motu | ho |
| Húngaro | hu |
| Icelandic | is |
| Ido | io |
| Igbo | ig |
| Indonesian | id |
| Interlingua (International Auxiliary Language Association) | ia |
| Interlingue / Occidental | ie |
| Inuktitut | iu |
| Inupiaq | ik |
| Irish | ga |
| Italiano | it |
| Japonés | ja |
| Javanese | jv |
| Kalaallisut / Greenlandic | kl |
| Kannada | kn |
| Kanuri | kr |
| Kashmiri | ks |
| Kazakh | kk |
| Kikuyu / Gikuyu | ki |
| Kinyarwanda | rw |
| Kirghiz / Kyrgyz | ky |
| Komi | kv |
| Kongo | kg |
| Coreano | ko |
| Kuanyama / Kwanyama | kj |
| Kurdish | ku |
| Lao | lo |
| Latin | la |
| Latvian | lv |
| Limburgan / Limburger / Limburgish | li |
| Lingala | ln |
| Lithuanian | lt |
| Luba-Katanga | lu |
| Luxembourgish / Letzeburgesch | lb |
| Macedonian | mk |
| Malagasy | mg |
| Malay | ms |
| Malayalam | ml |
| Maltese | mt |
| Manx | gv |
| Maori | mi |
| Marathi | mr |
| Marshallese | mh |
| Mongolian | mn |
| Nauru | na |
| Navajo / Navaho | nv |
| Ndonga | ng |
| Nepali | ne |
| North Ndebele | nd |
| Northern Sami | se |
| Norwegian Bokmål | nb |
| Norwegian Nynorsk | nn |
| Noruego | no |
| Occitan | oc |
| Ojibwa | oj |
| Oriya | or |
| Oromo | om |
| Ossetian / Ossetic | os |
| Pali | pi |
| Panjabi / Punjabi | pa |
| Persian | fa |
| Polaco | pl |
| Portugués | pt |
| Pushto / Pashto | ps |
| Quechua | qu |
| Romanian / Moldavian / Moldovan | ro |
| Romansh | rm |
| Rundi | rn |
| Ruso | ru |
| Samoan | sm |
| Sango | sg |
| Sanskrit | sa |
| Sardinian | sc |
| Serbio | sr |
| Shona | sn |
| Sichuan Yi / Nuosu | ii |
| Sindhi | sd |
| Sinhala / Sinhalese | si |
| Slovak | sk |
| Slovenian | sl |
| Somali | so |
| Sotho, Southern | st |
| South Ndebele | nr |
| Spanish / Castilian | es |
| Sundanese | su |
| Swahili | sw |
| Swati | ss |
| Sueco | sv |
| Tagalog | tl |
| Tahitian | ty |
| Tajik | tg |
| Tamil | ta |
| Tatar | tt |
| Telugu | te |
| Tailandés | th |
| Tibetan | bo |
| Tigrinya | ti |
| Tonga (Tonga Islands) | to |
| Tsonga | ts |
| Tswana | tn |
| Turco | tr |
| Turkmen | tk |
| Twi | tw |
| Uighur / Uyghur | ug |
| Ucranio | uk |
| Urdu | ur |
| Uzbek | uz |
| Venda | ve |
| Vietnamese | vi |
| Volapük | vo |
| Walloon | wa |
| Welsh | cy |
| Western Frisian | fy |
| Wolof | wo |
| Xhosa | xh |
| Yiddish | yi |
| Yoruba | yo |
| Zhuang / Chuang | za |
| Zulu | zu |
Complete list of hreflang region codes (ISO 3166-1 alpha-2)
All 249 officially assigned ISO 3166-1 alpha-2 codes. Any of them can follow the language code, e.g. en-IE o ar-EG. Codes that are not on this list, such as UK, EU o XK, or numeric UN M.49 codes such as 419, are not supported by Google.
| Country or territory | Region code |
|---|---|
| Afghanistan | AF |
| Albania | AL |
| Argelia | DZ |
| American Samoa | AS |
| Andorra | AD |
| Angola | AO |
| Anguilla | AI |
| Antarctica | AQ |
| Antigua and Barbuda | AG |
| Argentina | AR |
| Armenia | AM |
| Aruba | AW |
| Australia | AU |
| Austria | AT |
| Azerbaijan | AZ |
| Bahamas | BS |
| Bahrain | BH |
| Bangladesh | BD |
| Barbados | BB |
| Belarus | BY |
| Bélgica | BE |
| Belize | BZ |
| Benin | BJ |
| Bermuda | BM |
| Bhutan | BT |
| Bolivia | BO |
| Bonaire, Sint Eustatius and Saba | BQ |
| Bosnia and Herzegovina | BA |
| Botswana | BW |
| Bouvet Island | BV |
| Brasil | BR |
| British Indian Ocean Territory | IO |
| British Virgin Islands | VG |
| Brunei Darussalam | BN |
| Bulgaria | BG |
| Burkina Faso | BF |
| Burundi | BI |
| Cabo Verde | CV |
| Cambodia | KH |
| Camerún | CM |
| Canadá | CA |
| Cayman Islands | KY |
| Central African Republic | CF |
| Chad | TD |
| Chile | CL |
| Porcelana | CN |
| Christmas Island | CX |
| Cocos (Keeling) Islands | CC |
| Colombia | CO |
| Comoros | KM |
| Congo | CG |
| Congo (Democratic Republic) | CD |
| Cook Islands | CK |
| Costa Rica | CR |
| Croacia | HR |
| Cuba | CU |
| Curaçao | CW |
| Cyprus | CY |
| Chequia | CZ |
| Côte d’Ivoire | CI |
| Dinamarca | DK |
| Djibouti | DJ |
| Dominica | DM |
| Dominican Republic | DO |
| Ecuador | EC |
| Egipto | EG |
| El Salvador | SV |
| Equatorial Guinea | GQ |
| Eritrea | ER |
| Estonia | EE |
| Eswatini | SZ |
| Ethiopia | ET |
| Falkland Islands | FK |
| Faroe Islands | FO |
| Fiji | FJ |
| Finlandia | FI |
| Francia | FR |
| French Guiana | GF |
| French Polynesia | PF |
| French Southern Territories | TF |
| Gabon | GA |
| Gambia | GM |
| Georgia | GE |
| Alemania | DE |
| Ghana | GH |
| Gibraltar | GI |
| Grecia | GR |
| Greenland | GL |
| Grenada | GD |
| Guadeloupe | GP |
| Guam | GU |
| Guatemala | GT |
| Guernsey | GG |
| Guinea | GN |
| Guinea-Bissau | GW |
| Guyana | GY |
| Haiti | HT |
| Heard Island and McDonald Islands | HM |
| Holy See | VA |
| Honduras | HN |
| Hong Kong | HK |
| Hungría | HU |
| Iceland | IS |
| India | IN |
| Indonesia | ID |
| Irán | IR |
| Iraq | IQ |
| Irlanda | IE |
| Isle of Man | IM |
| Israel | IL |
| Italia | IT |
| Jamaica | JM |
| Japón | JP |
| Jersey | JE |
| Jordania | JO |
| Kazajstán | KZ |
| Kenia | KE |
| Kiribati | KI |
| Kuwait | KW |
| Kyrgyzstan | KG |
| Laos | LA |
| Letonia | LV |
| Lebanon | LB |
| Lesotho | LS |
| Liberia | LR |
| Libya | LY |
| Liechtenstein | LI |
| Lituania | LT |
| Luxembourg | LU |
| Macao | MO |
| Madagascar | MG |
| Malawi | MW |
| Malasia | MY |
| Maldives | MV |
| Mali | ML |
| Malta | MT |
| Marshall Islands | MH |
| Martinique | MQ |
| Mauritania | MR |
| Mauritius | MU |
| Mayotte | YT |
| México | MX |
| Micronesia | FM |
| Moldavia | MD |
| Monaco | MC |
| Mongolia | MN |
| Montenegro | ME |
| Montserrat | MS |
| Marruecos | MA |
| Mozambique | MZ |
| Myanmar | MM |
| Namibia | NA |
| Nauru | NR |
| Nepal | NP |
| Países Bajos | NL |
| New Caledonia | NC |
| Nueva Zelanda | NZ |
| Nicaragua | NI |
| Niger | NE |
| Nigeria | NG |
| Niue | NU |
| Norfolk Island | NF |
| North Korea | KP |
| North Macedonia | MK |
| Northern Mariana Islands | MP |
| Noruega | NO |
| Oman | OM |
| Pakistán | PK |
| Palau | PW |
| Palestine | PS |
| Panamá | PA |
| Papua New Guinea | PG |
| Paraguay | PY |
| Perú | PE |
| Filipinas | PH |
| Pitcairn | PN |
| Polonia | PL |
| Portugal | PT |
| Puerto Rico | PR |
| Qatar | QA |
| Rumania | RO |
| Russia | RU |
| Rwanda | RW |
| Réunion | RE |
| Saint Barthélemy | BL |
| Saint Helena, Ascension and Tristan da Cunha | SH |
| Saint Kitts and Nevis | KN |
| Saint Lucia | LC |
| Saint Martin (French part) | MF |
| Saint Pierre and Miquelon | PM |
| Saint Vincent and the Grenadines | VC |
| Samoa | WS |
| San Marino | SM |
| Sao Tome and Principe | ST |
| Arabia Saudí | SA |
| Senegal | SN |
| Serbia | RS |
| Seychelles | SC |
| Sierra Leone | SL |
| Singapur | SG |
| Sint Maarten (Dutch part) | SX |
| Eslovaquia | SK |
| Eslovenia | SI |
| Solomon Islands | SB |
| Somalia | SO |
| Sudáfrica | ZA |
| South Georgia and the South Sandwich Islands | GS |
| Corea del Sur | KR |
| South Sudan | SS |
| España | ES |
| Sri Lanka | LK |
| Sudan | SD |
| Suriname | SR |
| Svalbard and Jan Mayen | SJ |
| Suecia | SE |
| Suiza | CH |
| Syria | SY |
| Taiwán | TW |
| Tajikistan | TJ |
| Tanzania | TZ |
| Tailandia | TH |
| Timor-Leste | TL |
| Togo | TG |
| Tokelau | TK |
| Tonga | TO |
| Trinidad and Tobago | TT |
| Túnez | TN |
| Turkmenistan | TM |
| Turks and Caicos Islands | TC |
| Tuvalu | TV |
| Türkiye | TR |
| U.S. Virgin Islands | VI |
| Uganda | UG |
| Ucrania | UA |
| Emiratos Árabes Unidos | AE |
| Reino Unido | GB |
| Estados Unidos | US |
| United States Minor Outlying Islands | UM |
| Uruguay | UY |
| Uzbekistán | UZ |
| Vanuatu | VU |
| Venezuela | VE |
| Vietnam | VN |
| Wallis and Futuna | WF |
| Western Sahara* | EH |
| Yemen | YE |
| Zambia | ZM |
| Zimbabwe | ZW |
| Åland Islands | AX |
Preguntas frecuentes
Is hreflang case-sensitive? No. Google accepts en-gb, EN-GB y en-GB. Lowercase language plus uppercase region is the usual convention.
Should I use an underscore, as in en_US? No. hreflang values use a hyphen: en-US. The underscore form comes from software locale settings, not from hreflang.
Can I use three-letter language codes? Google’s documentation only supports ISO 639-1 language codes, which are all two letters. A language that only has a three-letter code (ISO 639-2 or 639-3) isn’t in the supported list.
Does Google use the HTML lang attribute instead? No. Google determines a page’s language from its visible content and doesn’t use code-level signals such as lang attributes, according to its guide to multi-regional and multilingual sites. Keep lang for accessibility and browsers, and use hreflang to connect the versions.
Do I need a region code for every page? No. Most translated sites only need language codes. Add regions when the pages really differ by country.
Want every page connected with correct hreflang codes automatically? Crea una cuenta ConveyThis y añade tu primer idioma.