Skip to content

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

hreflangMeans
enEnglish, for users anywhere
en-GBEnglish, for users in the United Kingdom
en-USEnglish, for users in the United States
es-MXSpanish, for users in Mexico
de-CHGerman, for users in Switzerland
fr-CAFrench, for users in Canada
pt-BRPortuguese, for users in Brazil
zh-HansChinese in Simplified script (ISO 15924 script code)
zh-Hant-TWChinese in Traditional script, for users in Taiwan
x-defaultThe fallback page when no other language or region matches, such as a language picker

Common mistakes

WrongRightWhy
en-UKen-GBThe ISO 3166-1 code for the United Kingdom is GB. UK isn't a valid region code.
GBen-GBA region on its own isn't allowed: the language always comes first.
en_USen-USSeparate the parts with a hyphen, not an underscore.
eu, es-419A list of country codesGoogle only supports ISO 3166-1 alpha-2 regions, so EU and UN M.49 codes such as 419 (Latin America) aren't supported.
jpja (Japanese)jp is the country code for Japan. The language code is ja; ja-JP is language plus region.
One-way annotationsLinks in both directionsIf page A lists page B, page B must list page A, or the annotations may be ignored.
Missing self-referenceEach page lists itself tooEvery version should include a link to itself alongside the others.
Relative URLsAbsolute URLsUse the full URL with protocol and domain, for example https://example.com/de/.
Pointing at redirects or noindex pagesThe final, indexable URLEach URL should return 200 and be the canonical version of that page.

Language codes (ISO 639-1)

The first part of every hreflang value.

CodeLanguage
arArabic
bgBulgarian
bnBengali
caCatalan
csCzech
cyWelsh
daDanish
deGerman
elGreek
enEnglish
esSpanish
etEstonian
faPersian
fiFinnish
frFrench
gaIrish
heHebrew
hiHindi
hrCroatian
huHungarian
idIndonesian
isIcelandic
itItalian
jaJapanese
koKorean
ltLithuanian
lvLatvian
msMalay
mtMaltese
nbNorwegian Bokmål
nlDutch
noNorwegian
plPolish
ptPortuguese
roRomanian
ruRussian
skSlovak
slSlovenian
srSerbian
svSwedish
swSwahili
taTamil
thThai
trTurkish
ukUkrainian
urUrdu
viVietnamese
zhChinese

Region codes (ISO 3166-1 alpha-2)

Optional second part, after a hyphen.

CodeCountry or region
AEUnited Arab Emirates
ARArgentina
ATAustria
AUAustralia
BEBelgium
BRBrazil
CACanada
CHSwitzerland
CLChile
CNChina
COColombia
CZCzechia
DEGermany
DKDenmark
EGEgypt
ESSpain
FIFinland
FRFrance
GBUnited Kingdom (not UK)
GRGreece
HKHong Kong
IEIreland
ILIsrael
INIndia
ITItaly
JPJapan
KRSouth Korea
MXMexico
MYMalaysia
NLNetherlands
NONorway
NZNew Zealand
PEPeru
PHPhilippines
PLPoland
PTPortugal
RORomania
SASaudi Arabia
SESweden
SGSingapore
THThailand
TRTürkiye
TWTaiwan
UAUkraine
USUnited States
VNVietnam
ZASouth 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