What is hreflang?
Hreflang (rel=alternate hreflang) is an annotation that tells search engines which language or country versions of a page exist, so that users see the most suitable version in search results.

hreflang: definition and purpose
Anyone who runs a website in several languages or for several countries has several addresses for similar content, such as /de/, /en/, and /es/. With hreflang annotations, Google learns that these pages are variants of the same content and which language or region each one is intended for. The matching version should then appear in search results.
Hreflang is a hint, not a command, and not a ranking factor. It does not translate content. Above all, it prevents Spanish-speaking users from landing on the German page, or nearly identical language versions, for example for Germany and Austria, from being treated as duplicates of each other.
How hreflang works
Each language version points to all versions, including itself. The language code follows ISO 639-1, optionally supplemented by a country code according to ISO 3166-1 Alpha 2, such as de-AT for German in Austria. The declarations go in the head of the page, in HTTP headers, or in the XML sitemap. Google treats all three methods equally.
The return links are crucial: if page A points to page B, B must also point to A, otherwise the declarations are ignored. The x-default value lets you define a fallback page for users for whom no version fits, for example a language selector.
- de – German, regardless of country
- de-AT – German for Austria
- en – English in general, en-GB for the United Kingdom
- x-default – fallback page or language selector
Real-world example: a supplier with three languages
A metalworking supplier sells in Germany, Austria, and Spain. The website exists in German, English, and Spanish. Previously, the English page also appeared for searches in Spain, and the German page for inquiries from Spain. With complete hreflang references for each page pair, also added to the sitemap, the chance that the matching language version appears increases significantly.
Important here: every product page needs references to its translation, not just the home page, and every language version must link back. For multilingual websites, Nano Concepts generates the references automatically from the site structure, so no page is forgotten and changes to the structure show up in the references right away.
Common mistakes and what to watch for
Mistakes do not reveal themselves, because the page works anyway. Specialized crawler tools check the references and uncover missing return pages. In addition, each language version should have its own permanently reachable address, preferably in subfolders such as /en/ or /es/, so that search engines can assign them unambiguously. Frequent mistakes:
- Missing return links between the versions
- Wrong codes, for example en-UK instead of en-GB, or a country code without a language
- Relative instead of absolute URLs
- References pointing to redirects or noindex pages
- Canonical pointing to the German version instead of the page's own language version
Frequently asked questions about hreflang
It makes sense as soon as there are several language or country versions. It is not mandatory, because Google recognizes languages without it. With hreflang, though, the chance that users see the matching version goes up.
de-DE. If the page is meant for all German-speaking users, de is enough. The language code always comes first, and the country code is optional. A country code on its own, such as DE, is invalid and is ignored.
All three options are equivalent for Google. The head is the most common, the sitemap suits many pages and languages, and the HTTP header is for PDFs. Choose one method and apply it consistently.
Canonical picks the main version among duplicates, while hreflang links equivalent translations or country versions. The two work together: each language version has a canonical pointing to itself and hreflang references to all the other versions.
Matching services

Multilingual Website
Separate URLs per language, hreflang, translated forms and local search terms – so international customers can find and understand you.
Learn more
Technical SEO & Relaunch
Relaunch and technical SEO with a redirect plan, load-time optimization and monitoring – together with LOMA DESIGN.
Learn more
Technical SEO Audit
A review of your website's crawling, indexing, structure and load time – with a prioritized action plan and implementation.
Learn moreRelated terms
Relevant for these industries
Related magazine articles

SEO and Search Visibility: Technology, Content and AI Search
Good rankings come from technology, content and consistent measurement – and increasingly from whether AI search tools use your pages as a source. Here is how your website becomes visible and generates qualified inquiries.
Read more
How to Configure GA4: Events, Key Events and Rollout
Google Analytics 4 only delivers reliable numbers when events, key events and consent are planned. Here is how to build a tracking plan that rolls out cleanly.
Read more
Improving Core Web Vitals: LCP, INP and CLS in Practice
Fast pages win over visitors and search engines. How to measure LCP, INP and CLS with field data, fix the typical causes and keep the numbers under control with budgets.
Read more