Hreflang Tag Generator

List of Hreflang language codes used by each country

  • Afrikaans: af
  • Albanian: sq
  • Amharic: am
  • Arabic: ar
  • Armenian: hy
  • Azerbaijani: az
  • Bashkir: ba
  • Basque: eu
  • Belarusian: be
  • Bengali: bn
  • Bosnian: bs
  • Bulgarian: bg
  • Burmese: my
  • Catalan: ca
  • Cebuano: cb
  • Central Khmer: km
  • Chichewa: ny
  • Chinese (Simplified): zh
  • Chinese (Traditional): tw
  • Corsican: co
  • Croatian: hr
  • Czech: cs
  • Danish: da
  • Dutch: nl
  • English: en
  • Esperanto: eo
  • Estonian: et
  • Fijian: fj
  • Filipino: fl
  • Finnish: fi
  • French: fr
  • Galician: gl
  • Georgian: ka
  • German: de
  • Greek Modern: el
  • Gujarati: gu
  • Haitian: ht
  • Hausa: ha
  • Hawaiian: hw
  • Hebrew: he
  • Hindi: hi
  • Hmong: hm
  • Hungarian: hu
  • Icelandic: is
  • Igbo: ig
  • Indonesian: id
  • Irish: ga
  • Italian: it
  • Japanese: ja
  • Javanese: jv
  • Kannada: kn
  • Kazakh: kk
  • Korean: ko
  • Kurdish: ku
  • Kyrgyz: ky
  • Lao: lo
  • Latin: la
  • Latvian: lv
  • Lithuanian: lt
  • Luxembourgish: lb
  • Macedonian: mk
  • Malagasy: mg
  • Malay: ml
  • Maltese: mt
  • Maori: mi
  • Marathi: mr
  • Mongolian: mn
  • Nepali: ne
  • Norwegian: no
  • Odia: or
  • Pashto: ps
  • Persian: fa
  • Polish: pl
  • Portuguese: pt
  • Punjabi: pa
  • Romanian: ro
  • Russian: ru
  • Samoan: sm
  • Scottish Gaelic: gd
  • Serbian: sr
  • Shona: sn
  • Sindhi: sd
  • Sinhalese: si
  • Slovak: sk
  • Slovenian: sl
  • Somali: so
  • Sotho, Southern: st
  • Spanish: es
  • Sundanese: su
  • Swahili: sw
  • Swedish: sv
  • Tagalog: tl
  • Tahitian: ty
  • Tajik: tj
  • Tamil: ta
  • Tatar: tt
  • Telugu: te
  • Thai: th
  • Tonga (Tonga Islands): to
  • Turkish: tr
  • Turkmen: tk
  • Ukrainian: uk
  • Urdu: ur
  • Uzbek: uz
  • Vietnamese: vi
  • Welsh: cy
  • Western Frisian: fy
  • Xhosa: xh
  • Yiddish: yi
  • Yoruba: yo
  • Zulu: zu

Hreflang is an HTML attribute used to specify the language and optional geographic targeting of a webpage. It is primarily used for internationalization and localization purposes, especially when dealing with content in multiple languages or regional variations.


This is how it works:


Language targeting: You specify the language of the target webpage using the hreflang attribute within the <link> tag in the <head> section of your HTML document.


Geotargeting (optional): You can also specify a region or country version of a language, which helps search engines understand which version of the page to serve to users in different regions.


Improves search engine optimization (SEO): Search engines like Google use hreflang to understand the language of web pages and regional targeting. This helps them provide the most relevant version of the page to users searching in different languages or regions.


Here's a basic example of how hreflang is used:


HTML

copy the code

<link rel='alternative' href='https://example.com/page1' hreflang='en' />

<link rel='alternative' href='https://example.com/de/page1' hreflang='de' />

in this instance:


The first <link> tag specifies that the current page (https://example.com/page1) is available in English.

The second <link> tag specifies that an alternative version of the page is available in German (DE) at the URL https://example.com/de/page1.

Search engines use this information to understand the relationship between different language versions of a page and to provide users with the appropriate version in search results based on their language and location preferences.

Comments