Language and region codes
The value that identifies a page’s language and, if needed, its country: de-CH is German for Switzerland.
What it is
Language and region codes are the labels that identify a page’s language and, if needed, the country it targets, such as de-CH for German in Switzerland. They’re used in hreflang and in the lang attribute.
For Google, the language comes first, in ISO 639-1 format, with two letters: de, fr, it, en. The region is optional and goes after it, in ISO 3166-1 alpha-2 format: CH, DE, AT. You can’t use the region on its own, and Google doesn’t accept codes outside these standards, such as es-419. Case doesn’t matter: de-ch and de-CH mean the same.
On a multilingual website
In Switzerland the question is when to add the region. If you have a single German version for Germany, Austria and Switzerland, de is enough. If an online shop in Basel has one version for Switzerland, with prices in francs and ss instead of ß, and another for Germany, it needs de-CH and de-DE. A classic mistake is en-UK: the code for the United Kingdom is en-GB.
How Arrampa checks it
Arrampa’s SEO audit flags as an error, page by page, every hreflang code that doesn’t exist, such as en-UK.
Source: Google Search Central: localised versions of your page
Related terms
- HreflangThe annotation that tells Google which version of a page belongs to each language and country.
- x-defaultThe hreflang value that says which version to show when no language or country on the list matches the user.
- Lang attributeThe HTML attribute that declares which language a page is written in, such as fr-CH on a page in French for Switzerland.
Guides
- SEO for a multilingual website in SwitzerlandA multilingual website ranks in Switzerland when each language has its own URL, copy written for that region and keywords researched in that language. The versions are linked with hreflang and measured separately. Here is the method, with what Google and Bing say.
- Hreflang step by stepHreflang is an annotation that tells Google which pages are versions of the same page in other languages or regions. It works if each version lists all of them, itself included, and they all link back to each other. Here is how to do it on a Swiss website and how to check it’s right.
- German for Switzerland or for GermanyIf your customers are in Switzerland, write in Swiss Standard German: no “ß”, the words people use here and prices in francs. A separate de-DE version only pays off if you also sell in Germany and have demand there. This guide explains the differences that matter for SEO and how to mark them up.
Want to know when we open?
One email to confirm and one on the day we open. Nothing else.