SEO for websites with multiple languages 🇬🇧🇫🇷🇨🇳
James Murdza
Posted on December 27, 2023
If your website contains content that is available in multiple languages, you may want to let Google know.
Let's say you have a page which is available in three languages: English, French and Mandarin Chinese.
You would first look up the correct language codes for those languages (see below) and then, in your page <head>
, add these tags:
<link rel="alternate" hreflang="en-US” href="https://mywebsite.com" />
<link rel="alternate" hreflang="fr” href="https://mywebsite.com/fr" />
<link rel="alternate" hreflang="zh-Hans” href="https://mywebsite.com/cn" />
Language code formats
But how do you know the right language codes to put in the hreflang attribute? According to Google's SEO docs there are three valid formats:
- Language code. Example:
zh
is Chinese - Language with a region. Example:
zh-TW
is Chinese as spoken in Taiwan - Language and script codes. Example:
zh-Hant
is Traditional Chinese
The first option should do just fine for most cases!
Lists of language codes
You can quickly find the language code you're looking for on Wikipedia.
That's it!
💖 💪 🙅 🚩
James Murdza
Posted on December 27, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
githubcopilot AI Innovations at Microsoft Ignite 2024 What You Need to Know (Part 2)
November 29, 2024