Localisation 5 August 2026
What Is an hreflang Tag? The Right Language Signal on a Multilingual Site
On a multilingual site, how does a search engine know which language to show which user? We look at what an hreflang tag does, at language codes and at the mistakes made most often.
You run a multilingual site; the same page exists in Turkish, English and German. But how does a search engine know which version to show a given user? One of the mechanisms that answers this question is the hreflang tag. An hreflang tag tells the search engine which language and which region a page belongs to, so that the user meets the version that suits their own language. When it is not set up correctly, the languages become tangled and the user lands on the wrong page.
Contents
This article looks at what an hreflang tag is, why it is needed, how language and country codes are written, the mistakes made most often, and how the tag relates to multilingual site architecture. Our aim is to make this technical marker intelligible to anyone running a multilingual site.
What is an hreflang tag?
An hreflang tag is a marker that states the language and regional identity of a page on a multilingual or multi-regional site. It tells the search engine, “this page belongs to this language and this region; the equivalents of the same content in other languages are over here”. The search engine can then show, among its results, the version best suited to the user’s language and location. The tag builds a language map across pages.
This marker is invisible in the interface; it sits in the background, in the source of the page or in the sitemap. The user never sees it but does feel its effect, in meeting the page in the right language. hreflang is one of those technical layers of localisation that stay out of sight yet bear directly on the user experience. Reaching the right person matters as much as the text itself.
hreflang is a recommendation rather than an obligation; it gives the search engine a strong signal but is not an absolute instruction. Even so, when it is set up correctly it markedly improves the user experience of a multilingual site. A user who finds the content they were after in their own language stays on the site longer and reaches their goal more easily. This is why hreflang, technical detail though it may look, ties straight to commercial results. An invisible marker makes a visible difference.
Why is it needed?
Without hreflang, versions of the same content in different languages can create trouble. A search engine may perceive those versions as copies of one another, or may show the user the page in the wrong language. A Turkish user meeting the English version, or a German user meeting the Turkish one, both spoils the user experience and weakens the site’s visibility. hreflang is the signal that prevents this confusion.
The signal becomes especially valuable when the same language has separate regional versions. If a piece of content has one version for Türkiye and another for a different region, hreflang steers the right version to the right user. The user then meets the prices, the currency and the wording that fit their own context. A correct language signal keeps the effort put into localisation from going to waste.
Duplicate content is the technical face of this need. Without a clear signal, versions of the same text in several languages can be confusing for a search engine. The system may be unable to work out which version to show to which user, or may treat the versions as copies competing with one another. hreflang resolves the confusion by stating plainly that each version addresses a separate audience. Languages thus become complements rather than rivals.
Language and country codes
hreflang states language and region with standard codes. Language is expressed through the international language code standard and, where needed, region through a country code. These codes are the same language and country codes that lie at the base of localisation. The identity of a page is therefore written in a universally recognised language, and every search engine reads it the same way.
These codes are not arbitrary; they rest on international standards. Language codes are made up of two or three letters and are derived from the language’s own name, while country codes are defined by a separate standard. The same standards also underpin the country-specific domain names used in web addresses. hreflang therefore speaks the same shared language as the rest of localisation and builds a consistent system of identity.
The table below gives examples of hreflang values. A language may be stated on its own, or language and country may be stated together. A default value may also be defined for cases in which no version fits; this states the version the user will be sent to when no match is found.
| Value | Meaning |
|---|---|
| tr | Turkish (independent of region) |
| tr-TR | Turkish as used in Türkiye |
| en | English (general) |
| x-default | Default version when there is no match |
Where and how is it added?
hreflang markers can be defined in several different places. The most common method is to add markers that link all the language versions to one another in the head section of each page’s source. As an alternative, the same information can be given in the sitemap or in the server response headers. Whichever method is chosen, the underlying principle is the same: every version must point to all the others.
A correct set-up follows a few basic steps:
- Settle the correct language and region code for each language version.
- On every page, add reciprocal markers to all the language versions.
- Define a default version for cases in which no match is found.
- Verify that the markers are reciprocal and consistent.
The step most often missed among these is that the markers have to be reciprocal. If one page points to another, the other must point back to it; otherwise the signal stays inconsistent.
Which method to choose depends on the size and the technical structure of the site. On a site with few pages, adding the markers to the source of each page is practical; on a large site with many pages, managing them through the sitemap is more sustainable. Multilingual content management systems and plugins can in most cases generate these markers automatically. Automation cuts down the errors that manual management brings, particularly as the number of pages grows.
Mistakes made most often
hreflang is a powerful mechanism, but one open to error. The most common mistake is a failure of reciprocity: one version points to another while the pointer back is missing. Another frequent mistake is the use of wrong or non-existent language-country codes. Forgetting to define the default version, in turn, leaves users for whom no match is found on the wrong page.
These mistakes are usually silent; the site looks as though it is working, but the search engine reads the signals wrongly. An hreflang set-up should therefore be verified carefully before it goes live. A small error in the code can damage the visibility of the whole multilingual structure. Verification is a step as important as the set-up itself.
Another frequent mistake is confusing the notions of language and region. Language expresses the language the user speaks; region expresses geographical location. The same language may be spoken in many regions, and more than one language may be found in the same region. hreflang has to reflect this distinction correctly. Adding a region unnecessarily where the language alone would do, or the other way round, can steer the user to the wrong version. Choosing the right level determines how accurate the signal is.
How it relates to site architecture
hreflang is not a solution that works on its own; it is part of a sound multilingual site architecture. The site’s URL structure, the way the language versions are organised and the way the locale gateway is set up all determine how effective hreflang will be. The language marker in the address bar already gives away which version a page belongs to; hreflang completes that structure and makes it explicit for the search engine.
hreflang therefore has to be thought through together with decisions about multilingual URL structure and the locale gateway. A consistent URL scheme makes reciprocal hreflang markers easier to set up. A scattered or inconsistent architecture, by contrast, can leave even the most correct hreflang set-up without effect. A good language signal is built on a good architecture.
The way the language versions are organised is part of that architecture too. A site may hold its different languages in subdirectories, in subdomains or on separate domains. Each option has its own advantages; but whichever is chosen, the hreflang markers must be set up to suit that structure and to stay consistent with it. When architecture and language signal agree with one another, a multilingual site offers a clear map to user and search engine alike.
The Türkiye context
hreflang is particularly valuable for sites opening out from Türkiye to markets abroad, or coming into the Turkish market from abroad. Turkish content can address both users in Türkiye and Turkish-speaking audiences living abroad. A correct language signal steers those audiences to the right version. In the same way, it is hreflang that makes sure an English version is shown to an international audience rather than to a Turkish user.
Where there is content specific to the Turkish market, using the region code correctly gains importance. A page carrying prices, currency and local wording should be shown only to users in Türkiye. hreflang draws that distinction. It should not be forgotten, though, that hreflang is no substitute for good localisation; it only makes sure that good localisation reaches the right person. This article is for general information.
What does this mean for you?
If you manage a multilingual site, your hreflang set-up bears directly on your visibility and on the experience of your users. Here is what you can do:
- Check that every language version is marked with the correct language and region code.
- Have it verified that the markers are reciprocal and consistent.
- Make sure a default version has been defined.
We can help you get the language signals of your multilingual site right. You can look through our web localisation services and, for the details, have a look at our knowledge centre. Our aim is to make sure the right content reaches the right user.
Frequently asked questions
What is an hreflang tag?
On a multilingual or multi-regional site, it is a marker that tells the search engine which language and which region a page belongs to. It helps the search engine show the user the right language version.
Why is hreflang needed?
Unless a clear signal is given, versions of the same content in different languages may be perceived as copies of one another, or the wrong language may be shown to the user. hreflang prevents this confusion.
How are language codes written?
Language is stated with an ISO language code and, where needed, region with a country code. For Turkish, for instance, tr is used, and for the Turkish of Türkiye, tr-TR. A default value can also be defined for ambiguous cases.
Is hreflang enough on its own?
It is not. hreflang works together with a sound multilingual site architecture, a consistent URL structure and correct language marking. On its own it is no substitute for good localisation.
Sources
Jiménez-Crespo, M. A. (2024). Localization in Translation. Routledge (Ch. 3/4/5/9/12). · W3C (2022). Internationalization Best Practices. World Wide Web Consortium.