code for a global website

Hreflang tags are essential to gaining global recognition if your website contains content in multiple languages or wants to give worldwide users a more personalised experience. The hreflang tagging process isn’t particularly complicated. However, you need to be organised as there is a need for reciprocal tagging, which may leave you struggling without expert support. You can also automate some of the process of tagging pages with the relevant hreflang tags. Read on to find out why they are essential for businesses targeting an international audience, what they look like, and the recognised hreflang codes.

Hreflang tags

As an HTML attributable tag, the hreflang specifies the language the page is written in and can also target the geographical location of the page, do that it is possible, for example, to show a page written in English, specifically with country dialects relevant to those in the US and Australia so that they see a version with spellings familiar to them, rather than a generic English language page. Google and some other search engines (excluding Bing) use the hreflang tag to serve users the correct version of the page.

The importance of a hreflang tag

Using hreflang tags provides a better customer experience for those searching in different countries that you want to attract to your products or services. They see your page in their search results in their language. After translating your page into other languages, it makes sense to carry out the additional step of hreflang tagging to show users the most appropriate version. Quickly displaying content in a visitor’s native tongue will improve the user experience and, therefore, user engagement rates. All of which will strengthen your SEO and ranking, and, of course, results in more conversions, sales and leads.

Adding a hreflang tag will also prevent search engines from seeing the multiple language pages as duplicates. The pages will be recognised and ranked in their own right, something essential for your search engine ranking and your place in the results shown in different countries. Hreflang clusters share the ranking of the best pages within the cluster. The best match gives the ranking even when the most relevant page is shown to searchers. Whilst hreflang tags are considered a directive so results are not guaranteed. They provide clear signals and a better chance of the best user experience than pages not tagged.

Targeting tags

As we have mentioned, you can tag the language of the page; a simple two-letter code is used, for example, ‘en’ for English and ‘de’ for German. All the relevant codes are listed below. After you have tagged the language, you can go on to tag regions, an optional step that will differentiate the multiple pages showing the addition of a region or country. For English speakers in the UK, the hreflang attribute would be en-gb, whereas for English speakers in the US it would be en-us. Here’s how the tags would look respectively:

<link rel=”alternate” href=http://example.com/ hreflang=”en-gb” />

<link rel=”alternate” href=http://example.com/ hreflang=”en-us” />

This has particular significance for e-commerce stores selling products in multiple countries. A US buyer would expect pricing displayed in dollars; Australians want to see AUS dollars, whilst you may be based in the UK and display prices in £s to users. You can solve this by creating three versions of your page, one for each currency. Each page, pricing aside, is identical, and the hreflang tag will signal to search engines that multiple versions exist and which one to display to visitors from the relevant country.

You can then go further to cater for countries such as Canada, where English and French are the official languages. If you create pages for the Canadian market, it is wise to have both a French and English page and tag them to meet the users’ search language.

Implementation

The first thing to remember is that each page needs a self-referring hreflang tag. For best practice, each page should point back to itself, in addition to the identical pages. You must also ensure that your pages feature a bidirectional pointer in addition to the self-directing tag. The tags are coded in pairs, so that your English pounds page, for instance, must point to the other currency versions, and they, in turn, must each point back to the English pounds page.

Consistency and accuracy are vital to avoid broken tags and the wrong results showing for your specific audiences, which is where it can become confusing without expert help and reliable automation tools to ensure that all areas are covered.

Search engines need to know the relationship of each page to analyse and display each page correctly. Hreflang tags can be incorporated into your web pages by HTTP headers, sitemaps or HTML tags. One of the simplest ways to begin is by adding them to your web page as a <head tag>.

Google also recommends using an x-default tag, which specifies a default page to show users should there not be a language-appropriate version specifically for them. The hreflang tag works on a best-match basis by initially looking for a country match. If no country matches, it will display a language match. If neither, then the fallback is the x-default page version.

There are no limits to the number of hreflang tags you can have on each page, which can, for the uninitiated, lead to confusion when implementing. Hence, starting with a clear map of your website content and how the pages and versions link together to work would be best. This, again, is something that a technical SEO consultancy such as Ditto Digital can assist with.

A final piece of advice – planning and organisation are vital to cover all areas fully and that each tag is reciprocated with bidirectional tagging. Ensure you have completed self-referring and set up defaults where necessary. Setting up the hreflang tags is not the end of the story. No matter how much you try, mistakes will always slip through, so you should regularly perform a technical SEO audit of  your website to pick up hreflang tag issues and correct them quickly.

Part one – Hreflang language codes

(2-letter ISO-639-1 Codes)

Language2-letter 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

Part 2 – Hreflang Region codes

(2-letter ISO-3166-1 Codes)

Country2-letter ISO Code
Å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 ofF
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
TaiwanTW
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, US.VI
Wallis and FutunaWF
Western SaharaEH
YemenYE
ZambiaZM
ZimbabweZW

Adding hreflang tags to improve your global user experience is something all website owners should see as a crucial part of supporting their worldwide exposure and growth, so the sooner you get started, the sooner you will reap the benefits.

About Michelle Symonds

Established as an SEO specialist since 2009, following a career as a software engineer in the oil industry and investment banking. Michelle draws on her IT and web development experience to develop best-practice processes for implementing successful SEO strategies. Her pro-active approach to SEO enables organisations to raise their online profile and reach new audiences, both nationally and internationally. She has a wealth of cross-industry experience from startups to Fortune 500 companies .

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.