What Is hreflang? Turkish, English and Arabic Versions
On this page09 sections
If a page has versions for different languages or regions, tell Google about those variants. Search can then point the user toward the version that fits their language or region better. Even if you do nothing, Google may still find the alternates. The document says it is usually better to indicate the versions explicitly.
What it is for
hreflang tells Google that these pages are localized variants of the same content. Google does not detect the language of a page with hreflang. It does not detect it with the HTML lang attribute either. It determines the language with algorithms. The folder name does not determine the audience either. In the document's example, the en, en-gb and de subdomains do not state the audience by themselves. The same holds for /tr/, /en/ and /ar/ folders. The mapping is written in the tag.
The job is not to raise a position. The job is to help the more suitable version be shown to that person in the result. Where a multilingual site sits inside SEO is separated briefly in the SEO article. This article is the tag itself.
A translation is not a duplicate
Localized versions count as duplicates only when the main content of the page stays untranslated. The document separates three situations. The main text stays in one language and only the menu and footer are translated, as on forums. The same language has small regional differences, for example separate English pages for the US, the UK and Ireland. The content is fully translated into several languages, for example a German and an English version of each page.
A page whose Turkish, English and Arabic text is written separately falls into the third situation. The three are not copies of each other. Tying all three to one canonical address breaks that distinction. The canonical rule is not in the next section. It sits at the end of the article, because the cluster itself is built first.
Three paths, pick one
There are three ways to tell Google about language and region versions. A link element in HTML, an HTTP header, and a sitemap. From Google's point of view the three are equivalent. Pick whichever is convenient for your site. You can use all three at once. There is no benefit in Search. Keeping three implementations in step is harder than keeping one.
HTML is useful when you have no sitemap or cannot write an HTTP header. The elements sit in the head. If the head is broken, the tags can end up outside it. The document suggests pasting the rendered code into an HTML validator if you are unsure. The HTTP header is for non-HTML files such as PDFs. A sitemap repeats the same cluster under each address with xhtml:link. The general rules of the file are in the XML sitemap article.
The rules of the cluster
The rules are shared by all three methods. Each language version lists itself and every other version. The addresses in the list are complete. They start with https. //example.com/foo or /foo is not enough. The addresses do not have to be on the same domain.
If two pages do not point at each other, the tags are ignored. The reason is that someone on another site cannot declare themselves an alternate version of your page. If keeping a full bidirectional list of every language gets hard, you can leave some languages off some pages. Google keeps processing the ones that point at each other. A newly added language needs a bidirectional link with the site's original language. On a three-language site the cluster is small, so keeping all four, including itself, on every page is the plainer upkeep.
If you have separate addresses for several regions of the same language, also give an address for that language with no region specified. The document's example is a generic en page alongside English for Ireland, Canada and Australia. The generic page can be one of those specific pages.
A Turkish, English and Arabic example
The four addresses below are made up. example.com is not a client site. Three of them are translations of a contact page. The fourth is a language selector. x-default is not a fourth translation of the contact page. It is the page a person lands on when their browser language matches none of tr, en or ar. The document says this value was designed especially for language-selector pages and for home pages that redirect automatically.
The same four elements sit in the head of all four pages. The Turkish page lists itself. The English page also lists the Turkish address. If one side is missing, that pair is ignored. The folder names are not the mapping.
| Version | Full address | hreflang |
|---|---|---|
| Turkish contact | https://example.com/tr/iletisim | tr |
| English contact | https://example.com/en/contact | en |
| Arabic contact | https://example.com/ar/contact | ar |
| Language selector | https://example.com/ | x-default |
Illustrative example
The line in the head of the Turkish page is below. The other three lines are in the same head. <link rel="alternate" hreflang="tr" href="https://example.com/tr/iletisim" />
On a non-HTML file the three language versions are written in an HTTP header. This sample has no x-default. Link: <https://example.com/tr/dosya.pdf>; rel="alternate"; hreflang="tr", <https://example.com/en/file.pdf>; rel="alternate"; hreflang="en", <https://example.com/ar/file.pdf>; rel="alternate"; hreflang="ar"
In a sitemap, xhtml:link children under each loc element repeat the same four. Child elements do not count toward the sitemap's URL limit. The namespace is: xmlns:xhtml="http://www.w3.org/1999/xhtml"
Language first, not a country alone
The value is one part or two, with a hyphen between them. The first is the language, ISO 639-1. The second is an optional region, ISO 3166-1 Alpha 2. Codes that are not in those lists are not supported. The document's example is the code es-419. The value is case-insensitive. Writing the region code in uppercase, for example tr-TR, follows the ISO form.
A country code is not written on its own. The first code is the language. Google does not derive the language from a country code. The document's Belgium example is this. de-BE, nl-BE and fr-BE are right. be is wrong, because be is the language code for Belarusian, not Belgium. SA on its own is not read as Saudi Arabia. Arabic for Saudi Arabia is ar-SA. TR on its own is the same as the Turkish language code tr, because the value is case-insensitive. It does not name Türkiye as a region. Turkish for Türkiye is written tr-TR.
UK, EU and UN have no effect inside hreflang. The region code for the United Kingdom is GB. Writing en-UK means writing with the part the document ignores. English for the United Kingdom is en-GB.
| Value | Meaning |
|---|---|
| tr | Turkish, no region |
| en | English, no region |
| ar | Arabic, no region. Enough for a single written Arabic. |
| tr-TR | Turkish for Türkiye |
| en-GB | English for the United Kingdom. Not UK. |
| ar-SA | Arabic for Saudi Arabia |
| x-default | No listed language or region matched the browser setting |
When the language does not match
x-default is used when no other language or region matches the user's browser setting. The document recommends it for naming the fallback page for language settings that match none of the site's localized versions. It can be used on any page. It works best with language-selector pages. No language code is written for x-default. The language of the page does not matter on this value, because the page is for the person whose language did not match.
The address https://example.com/ in the example does that job. Making the Turkish text of the contact page the x-default forces the unmatched language into Turkish. The document allows that. It says the value can be used on any page. A selector page is a more honest landing for a person outside the three languages.
Why a tag is ignored
No return
If the Turkish page lists the English address and the English page does not list the Turkish address, those annotations may be ignored or misread. The cluster is not built from one side.
Wrong language code
The first part has to be a language. Writing a region in place of a language is invalid. SA is not read as Saudi Arabia.
Wrong region code
UK, EU and UN have no effect. For region codes outside the list, Google ignores that part of the annotation, as the document puts it.
Another attribute on the same element
hreflang is not combined with another attribute such as media on the same link element. The canonical tag is a separate element too. Writing both on one tag drops the canonical side as well. That rule is in the canonical article.
The canonical stays in the same language
On a page that uses hreflang, the canonical should point at the page in the same language. If there is no canonical page in that language, the closest substitute language is chosen. The canonical address of the Turkish contact page is https://example.com/tr/iletisim. The English page's is the English address, and the Arabic page's is the Arabic address. Pointing all three at the Turkish address with canonical declares the translated page a duplicate.
When choosing a canonical, Google prefers addresses that point at each other inside the hreflang cluster. If two versions point at each other and a third is missing from the cluster, the ones in the cluster move ahead. The place the tags are produced is the site and the software. If the template holds three lines and the return line is missing on the live Arabic page, the cluster does not count as built for that page.
Sources
- Localized versions of your pages
Accessed October 20, 2026
- How to specify a canonical URL with rel="canonical" and other methods
Accessed October 20, 2026