fbpx

If you want your content to serve in multiple languages, then you must use the hreflang attribute. While international search is often ignored or on the back burner, it’s a big deal.

Getting the correct version of your site positioning in various Countries can hugely affect SERP click through rates and bounce rate..

What is Hreflang Attribute Used For

Hreflang is an HTML attribute used to specify the language and geographical targeting of a webpage. In the event that you have numerous renditions of a similar page in various dialects, you can utilize the hreflang tag to enlighten web crawlers like Google regarding these varieties. This encourages them to serve the right versions to the website visitors.

For what reason does hreflang make a difference for SEO?

On the off chance that you’ve invested energy making an interpretation of your website into various languages, at that point you’ll need web indexes to demonstrate the most fitting adaptation of your website.

Catering to the native tongue of search engine users also improves their experience. That often results in fewer people clicking away from your website which lower your bounce rate and increase time on page. These metrics have a positive impact on SEO and rankings.

Adding Hreflang Tags to Your Site

Web crawlers such as Google consider these variations:

HTML: If you want to specify the language and region of a website using HTML, you can do so by simply adding the following elements to your header:

<link rel="alternate" hreflang="lang_code" href="url_of_page" />

Each variation of the page should include a set of Hreflang tags in the <head> , one link for each page variant including itself.

Example:

Visit Apple.com website and view its source code to see HTML Hreflang tags in action.

HTTP Headers: For non-HTML files (ex. PDFs), you can return an HTTP header to tell web crawlers about language and region variants.

Link: <url1>; rel="alternate"; hreflang="lang_code_1", <url2>; rel="alternate"; hreflang="lang_code_2", ...

SITEMAP: You can use a sitemap to tell web crawlers all of the language and region variants for each URL, by having child entries listing every language/region variant.

Refer to this post for more information about how to implement Hreflang Tags to your site.

Hreflang Country Codes

To assist you with, I set up a rundown of Hreflang country codes (values) which you can use for making Hreflang header characteristics for your multilingual or multi-local site.

2 Digit Country ISO Codes
Country2 Digit ISO Code for href lang
AfghanistanAF
Åland IslandsAX
AlbaniaAL
AlgeriaDZ
American SamoaAS
AndorraAD
AngolaAO
AnguillaAI
AntarcticaAQ
Antigua and BarbudaAG
ArgentinaAR
ArmeniaAM
ArubaAW
AustraliaAU
AustriaAT
AzerbaijanAZ
BahamasBS
BahrainBH
BangladeshBD
BarbadosBB
BelarusBY
BelgiumBE
BelizeBZ
BeninBJ
BermudaBM
BhutanBT
Bolivia, Plurinational State ofBO
Bonaire, Sint Eustatius and SabaBQ
Bosnia and HerzegovinaBA
BotswanaBW
Bouvet IslandBV
BrazilBR
British Indian Ocean TerritoryIO
Brunei DarussalamBN
BulgariaBG
Burkina FasoBF
BurundiBI
CambodiaKH
CameroonCM
CanadaCA
Cabo VerdeCV
Cayman IslandsKY
Central African RepublicCF
ChadTD
ChileCL
ChinaCN
Christmas IslandCX
Cocos (Keeling) IslandsCC
ColombiaCO
ComorosKM
CongoCG
Congo, the Democratic Republic of theCD
Cook IslandsCK
Costa RicaCR
Côte d’IvoireCI
CroatiaHR
CubaCU
CuraçaoCW
CyprusCY
Czech RepublicCZ
DenmarkDK
DjiboutiDJ
DominicaDM
Dominican RepublicDO
EcuadorEC
EgyptEG
El SalvadorSV
Equatorial GuineaGQ
EritreaER
EstoniaEE
EthiopiaET
Falkland Islands (Malvinas)FK
Faroe IslandsFO
FijiFJ
FinlandFI
FranceFR
French GuianaGF
French PolynesiaPF
French Southern TerritoriesTF
GabonGA
GambiaGM
GeorgiaGE
GermanyDE
GhanaGH
GibraltarGI
GreeceGR
GreenlandGL
GrenadaGD
GuadeloupeGP
GuamGU
GuatemalaGT
GuernseyGG
GuineaGN
Guinea-BissauGW
GuyanaGY
HaitiHT
Heard Island and McDonald IslandsHM
Holy See (Vatican City State)VA
HondurasHN
Hong KongHK
HungaryHU
IcelandIS
IndiaIN
IndonesiaID
Iran, Islamic Republic ofIR
IraqIQ
IrelandIE
Isle of ManIM
IsraelIL
ItalyIT
JamaicaJM
JapanJP
JerseyJE
JordanJO
KazakhstanKZ
KenyaKE
KiribatiKI
Korea, Democratic People’s Republic ofKP
Korea, Republic ofKR
KuwaitKW
KyrgyzstanKG
Lao People’s Democratic RepublicLA
LatviaLV
LebanonLB
LesothoLS
LiberiaLR
LibyaLY
LiechtensteinLI
LithuaniaLT
LuxembourgLU
MacaoMO
Macedonia, the former Yugoslav Republic ofMK
MadagascarMG
MalawiMW
MalaysiaMY
MaldivesMV
MaliML
MaltaMT
Marshall IslandsMH
MartiniqueMQ
MauritaniaMR
MauritiusMU
MayotteYT
MexicoMX
Micronesia, Federated States ofFM
Moldova, Republic ofMD
MonacoMC
MongoliaMN
MontenegroME
MontserratMS
MoroccoMA
MozambiqueMZ
MyanmarMM
NamibiaNA
NauruNR
NepalNP
NetherlandsNL
New CaledoniaNC
New ZealandNZ
NicaraguaNI
NigerNE
NigeriaNG
NiueNU
Norfolk IslandNF
Northern Mariana IslandsMP
NorwayNO
OmanOM
PakistanPK
PalauPW
Palestine, State ofPS
PanamaPA
Papua New GuineaPG
ParaguayPY
PeruPE
PhilippinesPH
PitcairnPN
PolandPL
PortugalPT
Puerto RicoPR
QatarQA
RéunionRE
RomaniaRO
Russian FederationRU
RwandaRW
Saint BarthélemyBL
Saint Helena, Ascension and Tristan da CunhaSH
Saint Kitts and NevisKN
Saint LuciaLC
Saint Martin (French part)MF
Saint Pierre and MiquelonPM
Saint Vincent and the GrenadinesVC
SamoaWS
San MarinoSM
Sao Tome and PrincipeST
Saudi ArabiaSA
SenegalSN
SerbiaRS
SeychellesSC
Sierra LeoneSL
SingaporeSG
Sint Maarten (Dutch part)SX
SlovakiaSK
SloveniaSI
Solomon IslandsSB
SomaliaSO
South AfricaZA
South Georgia and the South Sandwich IslandsGS
South SudanSS
SpainES
Sri LankaLK
SudanSD
SurinameSR
Svalbard and Jan MayenSJ
SwazilandSZ
SwedenSE
SwitzerlandCH
Syrian Arab RepublicSY
Taiwan, Province of ChinaTW
TajikistanTJ
Tanzania, United Republic ofTZ
ThailandTH
Timor-LesteTL
TogoTG
TokelauTK
TongaTO
Trinidad and TobagoTT
TunisiaTN
TurkeyTR
TurkmenistanTM
Turks and Caicos IslandsTC
TuvaluTV
UgandaUG
UkraineUA
United Arab EmiratesAE
United KingdomGB
United StatesUS
United States Minor Outlying IslandsUM
UruguayUY
UzbekistanUZ
VanuatuVU
Venezuela, Bolivarian Republic ofVE
Viet NamVN
Virgin Islands, BritishVG
Virgin Islands, U.S.VI
Wallis and FutunaWF
Western SaharaEH
YemenYE
ZambiaZM
ZimbabweZW

2 Digit Language ISO Codes
Language2 Digit ISO Code
Abkhazab
Afaraa
Afrikaansaf
Akanak
Albaniansq
Amharicam
Arabicar
Aragonesean
Armenianhy
Assameseas
Avaricav
Avestanae
Aymaraay
Azerbaijaniaz
Bambarabm
Bashkirba
Basqueeu
Belarusianbe
Bengali, Banglabn
Biharibh
Bislamabi
Bosnianbs
Bretonbr
Bulgarianbg
Burmesemy
Catalan, Valencianca
Chamorroch
Chechence
Chichewa, Chewa, Nyanjany
Chinesezh
Chuvashcv
Cornishkw
Corsicanco
Creecr
Croatianhr
Czechcs
Danishda
Divehi, Dhivehi, Maldiviandv
Dutchnl
Dzongkhadz
Englishen
Esperantoeo
Estonianet
Eweee
Faroesefo
Fijianfj
Finnishfi
Frenchfr
Fula, Fulah, Pulaar, Pularff
Galiciangl
Georgianka
Germande
Greek (modern)el
Guaranígn
Gujaratigu
Haitian, Haitian Creoleht
Hausaha
Hebrew (modern)he
Hererohz
Hindihi
Hiri Motuho
Hungarianhu
Interlinguaia
Indonesianid
Interlingueie
Irishga
Igboig
Inupiaqik
Idoio
Icelandicis
Italianit
Inuktitutiu
Japaneseja
Javanesejv
Kalaallisut, Greenlandickl
Kannadakn
Kanurikr
Kashmiriks
Kazakhkk
Khmerkm
Kikuyu, Gikuyuki
Kinyarwandarw
Kyrgyzky
Komikv
Kongokg
Koreanko
Kurdishku
Kwanyama, Kuanyamakj
Latinla
Luxembourgish, Letzeburgeschlb
Gandalg
Limburgish, Limburgan, Limburgerli
Lingalaln
Laolo
Lithuanianlt
Luba-Katangalu
Latvianlv
Manxgv
Macedonianmk
Malagasymg
Malayms
Malayalamml
Maltesemt
Māorimi
Marathi (Marāṭhī)mr
Marshallesemh
Mongolianmn
Nauruna
Navajo, Navahonv
Northern Ndebelend
Nepaline
Ndongang
Norwegian Bokmålnb
Norwegian Nynorsknn
Norwegianno
Nuosuii
Southern Ndebelenr
Occitanoc
Ojibwe, Ojibwaoj
Old Church Slavonic, Church Slavonic, Old Bulgariancu
Oromoom
Oriyaor
Ossetian, Osseticos
Panjabi, Punjabipa
Pālipi
Persian (Farsi)fa
Polishpl
Pashto, Pushtops
Portuguesept
Quechuaqu
Romanshrm
Kirundirn
Romanianro
Russianru
Sanskrit (Saṁskṛta)sa
Sardiniansc
Sindhisd
Northern Samise
Samoansm
Sangosg
Serbiansr
Scottish Gaelic, Gaelicgd
Shonasn
Sinhala, Sinhalesesi
Slovaksk
Slovenesl
Somaliso
Southern Sothost
Spanish, Castilianes
Sundanesesu
Swahilisw
Swatiss
Swedishsv
Tamilta
Telugute
Tajiktg
Thaith
Tigrinyati
Tibetan Standard, Tibetan, Centralbo
Turkmentk
Tagalogtl
Tswanatn
Tonga (Tonga Islands)to
Turkishtr
Tsongats
Tatartt
Twitw
Tahitianty
Uyghur, Uighurug
Ukrainianuk
Urduur
Uzbekuz
Vendave
Vietnamesevi
Volapükvo
Walloonwa
Welshcy
Wolofwo
Western Frisianfy
Xhosaxh
Yiddishyi
Yorubayo
Zhuang, Chuangza
Zuluzu

Are Hreflang Language Codes values case sensitive?

Capitalization (lowercase vs. uppercase) does not matter, however it is recommended by ISO 3166 convention that language codes are lowercase and country codes are uppercase.

Multiple Language Variations

For a country with multiple language variations, the proper script is automatically derived from the country code. For example, when entering Hreflang tags for Chinese language in Taiwan, the resulting script will be (zh-TW). But you can also specify the language variation of Chinese by using ISO15924 code guide, which allows you to choose between Chinese (Traditional) or (Simplified).

Main Hreflang language and country code:
zh-TW

Specific language code variations:
zh-Hant: Chinese (Traditional)
zh-Hans: Chinese (Simplified)

Hreflang Tag for Unmatched Languages

When no languages match the browser settings, x-default tag may be used.

x-default: This language does not match any others on this page, but will be served for browsers that have their default language set to it or use a browser without explicit preferences of languages and scripts.

hreflang="x-default"

Common Hreflang Tag Mistakes

Here are the most common mistakes that I have seen with hreflang tags:

1) Not using hreflang tag on every page

2) Using wrong language codes

3) Missing language code

Be sure to check your hreflang tags to make sure they are accurate.

Troubleshooting Hreflang Errors

If you run into Hreflang errors, first thing to do is to check whether you committed one of the common mistakes stated above.

You may also use Google Search Console tool to check or use this Hreflang Testing tool.

There are also many third-party tools available to create the language script to avoid errors. Here are some of the most popular ones:

Hreflang Generator by Sistrix
Geotargetly

Hreflang Tags helps you align your website content to specific regions and languages.

By using this code correctly on all versions of your site, you can tell search engines what language they are accessing at any given time so as to direct them towards the appropriate translated copy. This ensures that users find exactly what they’re looking for from whichever country or region it was originally written.

If you have any questions, please email info@scottshorter.com.au and we will get back to you.

About Scott Shorter

He is a 20 year SEO & Digital Marketing specialist in Australia with multiple guest speaking engagements for Edith Cowan University, from which he graduated with a B.Comms – BSc (M) Multimedia & Internet Computing in 2005. Working for prominent SEO companies in leadership roles before starting Scott Shorter PTY LTD in 2011, his learning has been validated with over 1500 search campaigns. He is recognised within testimonials for 159%-267% increases to New Homes Guide (The West Australian), HealthEngine (Telstra, Yahoo/Seven), GolfBox & Tyresales.com.au

Learn More