Table of Contents
If you run a multilingual or international website, using the correct hreflang language codes and hreflang country codes is essential. These codes tell search engines which version of a page should appear for users based on their language preferences and geographic location.
Search engines rely on standardized systems such as ISO 639 language codes and ISO 3166 region codes to understand language targeting and regional targeting. When these codes are implemented correctly in the hreflang attribute, search engines can deliver the right page to the right audience.
This guide provides a complete reference of hreflang language codes, hreflang region codes, and country codes used in international SEO. The page also explains how these codes work, how they should be implemented, and how to validate them using a hreflang checker tool.
What Are Hreflang Language Codes
Hreflang language codes are short identifiers used in the hreflang attribute to specify the language of a webpage. These identifiers follow the ISO 639-1 language code standard, which uses two letter codes to represent languages.
Search engines analyze these codes to understand the language of a page and match it with users searching in that language.
Example:
<link rel=”alternate” hreflang=”en” href=”https://example.com/” />
In this example, the language code en indicates that the page is written in English.
If a website has multiple language versions of the same page, hreflang tags help search engines connect those pages together.
Example of multiple language versions:
<link rel=”alternate” hreflang=”en” href=”https://example.com/” />
<link rel=”alternate” hreflang=”es” href=”https://example.com/es/” />
<link rel=”alternate” hreflang=”fr” href=”https://example.com/fr/” />
Search engines can then show the Spanish version to Spanish speaking users and the French version to French speaking users.
Structure of Hreflang Codes
A hreflang code can contain only a language code or a language code combined with a region code.
A simple language code looks like this:
hreflang=”de”
This indicates German language content.
A language and region combination looks like this:
hreflang=”en-us”
In this example:
Language code → en
Country code → us
The structure therefore follows this format:
Language code
or
Language code + region code
These region identifiers come from ISO-3166-1 country codes, which represent geographic locations.
Complete List of ISO 639 Hreflang Language Codes
The following table includes all ISO 639-1 language codes commonly used for hreflang language targeting.
| Language | Code |
|---|---|
| Abkhaz | ab |
| Afar | aa |
| Afrikaans | af |
| Akan | ak |
| Albanian | sq |
| Amharic | am |
| Arabic | ar |
| Aragonese | an |
| Armenian | hy |
| Assamese | as |
| Avaric | av |
| Avestan | ae |
| Aymara | ay |
| Azerbaijani | az |
| Bashkir | ba |
| Basque | eu |
| Belarusian | be |
| Bengali | bn |
| Bislama | bi |
| Bosnian | bs |
| Breton | br |
| Bulgarian | bg |
| Burmese | my |
| Catalan | ca |
| Chamorro | ch |
| Chechen | ce |
| Chinese | zh |
| Chuvash | cv |
| Cornish | kw |
| Corsican | co |
| Cree | cr |
| Croatian | hr |
| Czech | cs |
| Danish | da |
| Dutch | nl |
| Dzongkha | dz |
| English | en |
| Esperanto | eo |
| Estonian | et |
| Ewe | ee |
| Faroese | fo |
| Fijian | fj |
| Finnish | fi |
| French | fr |
| Frisian | fy |
| Fulah | ff |
| Gaelic | gd |
| Galician | gl |
| Ganda | lg |
| Georgian | ka |
| German | de |
| Greek | el |
| Greenlandic | kl |
| Guarani | gn |
| Gujarati | gu |
| Haitian | ht |
| Hausa | ha |
| Hebrew | he |
| Herero | hz |
| Hindi | hi |
| Hiri Motu | ho |
| Hungarian | hu |
| Icelandic | is |
| Igbo | ig |
| Indonesian | id |
| Interlingua | ia |
| Interlingue | ie |
| Inuktitut | iu |
| Inupiak | ik |
| Irish | ga |
| Italian | it |
| Japanese | ja |
| Javanese | jv |
| Kalaallisut | kl |
| Kannada | kn |
| Kanuri | kr |
| Kashmiri | ks |
| Kazakh | kk |
| Khmer | km |
| Kikuyu | ki |
| Kinyarwanda | rw |
| Kirghiz | ky |
| Komi | kv |
| Kongo | kg |
| Korean | ko |
| Kurdish | ku |
| Lao | lo |
| Latin | la |
| Latvian | lv |
| Limburgish | li |
| Lingala | ln |
| Lithuanian | lt |
| Luxembourgish | lb |
| Macedonian | mk |
| Malagasy | mg |
| Malay | ms |
| Malayalam | ml |
| Maltese | mt |
| Maori | mi |
| Marathi | mr |
| Marshallese | mh |
| Mongolian | mn |
| Nauru | na |
| Navajo | nv |
| Nepali | ne |
| Norwegian | no |
| Occitan | oc |
| Ojibwa | oj |
| Oriya | or |
| Oromo | om |
| Ossetian | os |
| Pali | pi |
| Persian | fa |
| Polish | pl |
| Portuguese | pt |
| Punjabi | pa |
| Quechua | qu |
| Romanian | ro |
| Russian | ru |
| Samoan | sm |
| Sanskrit | sa |
| Sardinian | sc |
| Serbian | sr |
| Shona | sn |
| Sindhi | sd |
| Sinhala | si |
| Slovak | sk |
| Slovenian | sl |
| Somali | so |
| Spanish | es |
| Sundanese | su |
| Swahili | sw |
| Swedish | sv |
| Tagalog | tl |
| Tajik | tg |
| Tamil | ta |
| Tatar | tt |
| Telugu | te |
| Thai | th |
| Tibetan | bo |
| Tigrinya | ti |
| Tonga | to |
| Turkish | tr |
| Turkmen | tk |
| Twi | tw |
| Uighur | ug |
| Ukrainian | uk |
| Urdu | ur |
| Uzbek | uz |
| Vietnamese | vi |
| Welsh | cy |
| Wolof | wo |
| Xhosa | xh |
| Yiddish | yi |
| Yoruba | yo |
| Zhuang | za |
| Zulu | zu |
These represent the complete set of ISO 639 language codes that can be used for hreflang language targeting.
Hreflang Country Codes and Region Codes
While language codes define the language of a page, hreflang country codes define the geographic region that the page targets. These codes follow the ISO 3166-1 Alpha-2 country code standard.
For example:
hreflang=”en-us”
Here:
Language → English
Region → United States
Example for Canada:
hreflang=”en-ca”
Example for French Canada:
hreflang=”fr-ca”
This allows websites to provide localized content for different countries even if the language is the same.
List of ISO 3166 Hreflang Country Codes
Below is a reference list of ISO 3166-1 country codes used for hreflang region targeting.
| Country | Code |
|---|---|
| Afghanistan | AF |
| Albania | AL |
| Algeria | DZ |
| Argentina | AR |
| Australia | AU |
| Austria | AT |
| Bangladesh | BD |
| Belgium | BE |
| Brazil | BR |
| Bulgaria | BG |
| Canada | CA |
| Chile | CL |
| China | CN |
| Colombia | CO |
| Croatia | HR |
| Czech Republic | CZ |
| Denmark | DK |
| Egypt | EG |
| Estonia | EE |
| Finland | FI |
| France | FR |
| Germany | DE |
| Greece | GR |
| Hong Kong | HK |
| Hungary | HU |
| Iceland | IS |
| India | IN |
| Indonesia | ID |
| Iran | IR |
| Iraq | IQ |
| Ireland | IE |
| Israel | IL |
| Italy | IT |
| Japan | JP |
| Jordan | JO |
| Kazakhstan | KZ |
| Kenya | KE |
| Kuwait | KW |
| Latvia | LV |
| Lebanon | LB |
| Lithuania | LT |
| Luxembourg | LU |
| Malaysia | MY |
| Mexico | MX |
| Morocco | MA |
| Netherlands | NL |
| New Zealand | NZ |
| Nigeria | NG |
| Norway | NO |
| Pakistan | PK |
| Peru | PE |
| Philippines | PH |
| Poland | PL |
| Portugal | PT |
| Qatar | QA |
| Romania | RO |
| Russia | RU |
| Saudi Arabia | SA |
| Singapore | SG |
| Slovakia | SK |
| Slovenia | SI |
| South Africa | ZA |
| South Korea | KR |
| Spain | ES |
| Sri Lanka | LK |
| Sweden | SE |
| Switzerland | CH |
| Thailand | TH |
| Turkey | TR |
| Ukraine | UA |
| United Arab Emirates | AE |
| United Kingdom | GB |
| United States | US |
| Vietnam | VN |
These codes are used in hreflang tags to indicate the regional audience of a page.
Language and Region Code Examples
When targeting specific regions, language codes and region codes are combined.
Example:
<link rel=”alternate” hreflang=”en-us” href=”https://example.com/us/” />
<link rel=”alternate” hreflang=”en-gb” href=”https://example.com/uk/” />
<link rel=”alternate” hreflang=”en-au” href=”https://example.com/au/” />
This structure allows search engines to differentiate between:
English content for United States
English content for United Kingdom
English content for Australia
Another example for Spanish speaking regions:
hreflang=”es-es”
hreflang=”es-mx”
hreflang=”es-ar”
These represent Spanish content targeting Spain, Mexico, and Argentina.
Why Correct Codes Matter for SEO
Correct hreflang language codes and region codes are essential for international SEO because they help search engines understand multilingual content.
Proper hreflang tag implementation helps prevent duplicate content issues when multiple language versions exist. It also improves search visibility in international markets by ensuring users see the most relevant language version.
For example, if a user in Spain searches for a product, Google should display the Spanish version of the page rather than the English version. Hreflang tags allow search engines to make this distinction.
Accurate language targeting also improves user experience, reduces bounce rates, and increases engagement for global audiences.
Validating Hreflang Codes
After implementing hreflang tags, it is important to verify that the language codes and region codes are valid.
Common errors include:
- invalid language codes
- incorrect country codes
- missing alternate references
- incorrect page relationships
A hreflang validation tool can scan a webpage and detect these issues.
Using such tools helps ensure that all hreflang language codes, country codes, and region combinations are implemented correctly.
FAQs
What are hreflang language codes?
What country codes are used in hreflang?
Can hreflang work with only language codes?
What is x default in hreflang?
hreflang="x-default"
Lisa B. Kastner
Lisa B. Kastner is an SEO specialist with 10+ years experience in technical SEO, international SEO, and multilingual website optimization.