An HTML attribute that tells search engines which language and country a page is written for and where its other language versions are.
Also called: hreflang tag, rel=alternate hreflang
hreflang tags list all versions of a page, for example de-CH, fr-CH, it-CH and en. Each version must list all the others and itself, and the URLs must be the canonical ones. They can sit in the HTML head, in HTTP headers or in the XML sitemap.
hreflang does not improve rankings directly. It helps Google show the right version to the right user and prevents versions for different countries from being treated as duplicates.
Why hreflang matters in Switzerland
Swiss websites often have three or four language versions, plus versions for neighbouring countries. Mistakes in hreflang are among the most common technical problems we see on multilingual Swiss sites.
Our tip
Check that every hreflang link points to a page that returns status 200, is canonical and links back.
Related terms
- x-default – A special hreflang value for the page that should be shown when no language version matches the user.
- de-CH vs de-DE – The language-region codes for German in Switzerland (de-CH) and German in Germany (de-DE) – two different target markets.
- Language and country folders – A URL structure in which each language or country version lives in its own folder, such as /de-ch/ or /fr/.
- International SEO – Search engine optimisation for websites that target several countries or languages at the same time.
- Language regions (Switzerland) – Switzerland is divided into German-, French-, Italian- and Romansh-speaking regions, and each one behaves like its own search market.
- Romandie (French-speaking Switzerland) – The French-speaking western part of Switzerland, with Geneva, Lausanne, Neuchâtel, Fribourg and the French-speaking part of Valais.
Learn more
← All terms in the Swiss SEO glossary
Frequently asked questions
What is hreflang?
An HTML attribute that tells search engines which language and country a page is written for and where its other language versions are.