Imagine a procurement manager in Germany landing on your export site and seeing a Turkish page. Or worse, imagine a search for your product in German returning your English page to a buyer who would have preferred the German version. How does a search engine know which page is meant for which language and region, and which versions of the same content exist? The answer is a small HTML signal called hreflang.
Key Takeaways
- hreflang tells search engines which language and region each version of a page targets.
- The language code (ISO 639-1) is required; the region code (ISO 3166-1 Alpha-2) is optional.
- Every page must list the full set of versions, including itself; return links are mandatory.
- x-default names the fallback page for users whose language matches no version.
- hreflang is a hint, not a directive; correct implementation and consistency decide the outcome.
What hreflang is and what problem it solves
hreflang is an annotation attribute that tells search engines which language, and optionally which regional audience, a page is meant for, and where the other language versions of the same content live. In short, it is a map that says: this page is for Turkish readers, that one for English readers, and that one for German readers.
The problem is that the versions of a multilingual page are nearly identical in topic. A search engine may treat them as duplicates, or show the wrong language version to a user. hreflang reduces that ambiguity. Google's official documentation describes hreflang as a hint: the search engine takes the annotation into account, but it does not guarantee that every annotation will be applied exactly as written.
What does the signal actually change?
When implemented correctly, a user in Germany may see the German or English version, while a user in Türkiye sees the Turkish one. When implemented poorly, internal pages get mixed up in results, users land on the wrong language, bounce back, and the versions end up weakening each other.
Is hreflang the same as translation?
No. Translation changes the language of the text. hreflang tells the search engine how the versions relate to each other. A translated page without links to its counterparts causes confusion, and so does a set of links that point to pages nobody has translated. Both halves have to be right.
Basic syntax: language and region codes
An hreflang value has two parts: a required language code and an optional region code. The language code follows ISO 639-1 and the region code follows ISO 3166-1 Alpha-2. For example, tr targets Turkish speakers in general, while tr-TR targets Turkish speakers in Türkiye. For the full code lists and practical examples, see the language and region codes guide.
Language first, then region
Language codes are two lowercase letters: de, fr, es, ar. A region code is a two-letter country code appended with a hyphen. So de-AT targets Austrian German and de-CH targets Swiss German. If there is no meaningful regional difference in the content, using only de is enough.
The most common code mistake
Writing en-UK for the United Kingdom is a frequent error. In ISO 3166 the code for the United Kingdom is GB, while uk stands for Ukrainian on the language side. The correct value is en-GB.
| Value | Meaning | Status |
|---|---|---|
| tr | Turkish, no region specified | Valid |
| tr-TR | Turkish, Türkiye | Valid |
| en-GB | English, United Kingdom | Valid |
| en-UK | Not a valid region code | Invalid, use en-GB |
| x-default | Fallback page for users whose language matches no version | Valid |
Letter case makes no practical difference, but pick one format and use it across the whole site. As teams grow, different people write codes differently; generating the code list from a single source prevents most of these errors.
Which pages belong in an hreflang set?
Not every page needs an hreflang set. The decision depends on whether the page has a real counterpart in another language. The table below gives a general frame for common page types.
| Page type | Belongs in a set? | Note |
|---|---|---|
| Translated product page | Yes | All language versions should reference each other |
| Untranslated product page | No | Leave it out so you do not send a wrong-language signal |
| Language selector homepage | Worth considering | A good candidate for x-default |
| Noindex page | No | A page excluded from search should not sit in the set |
| Filtered or parameter URL | Usually no | Should stay consistent with its canonical URL |
Scope is not only a matter of how many translations exist. It also matters whether the content serves the same purpose. If two pages describe the same product and answer the same buyer intent, the set logic works. Pages focused on different product lines in different markets should not be forced into one set.
Reciprocal links: every page must recognize the others
The most overlooked hreflang rule is this: if one page points to another language version, that version must point back. This is called a return link. A one-way annotation does not create a reliable relationship for the search engine.
Every page must include itself
Each page must list the full set, including its own address. The English page's set contains en as well as tr, de or other versions, and the same set should be reflected on every version.
A hypothetical example
A company in Bursa that makes zippers (hypothetical example) publishes Turkish, English and German versions. The German page lists the Turkish and English versions, but the English page does not list the German one. Because the relationship is one-way, the search engine may not trust the set, and a buyer in Germany could see the wrong version. The fix is to add the missing entry to the English page, and to verify the set by reading the complete group from every version.
To catch these problems regularly, start from a list of pages and run a crawl that checks every return link. For the types of errors and how to fix them, see the hreflang errors section of the international SEO guide.
x-default: the fallback page
x-default marks the default page shown when the user's language does not match any version. For example, if a visitor in Japan matches none of your Turkish, English or German versions, the x-default page is the one that applies. In practice this is usually a language selector page or your broadest English version.
When does x-default make sense?
If your homepage has a language selector, marking that page as x-default is a common and sensible choice. If every version is country-specific and there is no clear default audience, you can skip x-default, but make that decision deliberately. You can see practical implementation patterns in the x-default guide.
x-default is not a language
x-default is neither a language nor a region code. Think of it as a multilingual fallback page. If you have a real English version, assigning x-default to it is a frequent and practical choice. What matters most is applying the decision consistently across the whole set.
Checklist for the core rules
Before you publish any hreflang setup, run through this list:
- Does each language version list the full set on its own page?
- Does every language and region code follow the ISO standards?
- Are all addresses in the set written as full, absolute URLs?
- Is the return link complete between all versions?
- Does each page include itself?
- Was the x-default decision made on purpose?
- Are the listed pages indexable and canonical?
The last item matters. Putting a noindex page, or a page that canonicalizes to another URL, into the set mixes up the signals. Google's documentation recommends that hreflang annotations point to canonical pages.
Common mistakes and how to avoid them
Wrong language match
Marking a page whose content is in English as tr sends users the wrong language. Make sure the annotation reflects the page's real language. If the language is hard-coded in a template, it can stay wrong after translation.
Relative URLs
hreflang addresses should be written as full URLs such as https://yourdomain.com/en/product, not relative paths like /en/product. Relative addresses can be interpreted differently depending on the domain the page is served from.
Broken or redirected addresses in the set
If an address in the set returns a 404 or sits inside a redirect chain, the search engine cannot establish the relationship. Check regularly after publishing, especially after URL changes.
Listing noindex pages
A page excluded from search that still appears in the set prevents that language version from being shown to users. List only indexable pages.
Conflicts with canonical tags
If a page's canonical tag points to another version, hreflang should follow the same logic. Otherwise the search engine cannot tell which version should be treated as primary.
Implementation methods: HTML, HTTP headers and sitemaps
hreflang can be implemented in three ways. The right choice depends on your technical setup and content type.
HTML link elements
The most common method is adding <link rel="alternate" hreflang="..." href="..."> elements to the <head> of each page. For HTML pages this is the most readable approach, but the head grows as the set grows. For a side-by-side comparison of the three methods, read the implementation methods article.
HTTP response headers
For non-HTML files such as PDFs, hreflang can be delivered in the HTTP response header. This is the practical way to declare language versions of documents. For details, see the article on adding hreflang to PDFs via HTTP headers.
XML sitemaps
On large sites, hreflang can be declared in bulk inside an XML sitemap. Managing the set in one file reduces per-page HTML maintenance. Make sure the sitemap covers every version and that every address in it is correct.
WordPress and multilingual plugins
On WordPress, multilingual plugins can generate hreflang automatically. Still, check the output: plugin updates and new pages can break the set. For installation and validation steps, see the WordPress hreflang setup article.
Validation and monitoring
Validation matters as much as implementation. Turn these steps into a routine:
- Crawl your site, collect each page, and extract its hreflang values.
- If tags are added by JavaScript, also check the final HTML rendered in a browser.
- Verify the return links for every address in a table.
- Monitor the indexing reports and the URL inspection tool in Google Search Console for the relevant pages.
- Review server logs periodically for requests and redirects coming from different markets.
These checks are especially valuable when the content team adds new pages, because they catch mistakes before they accumulate.
Common misconceptions
Does hreflang raise rankings?
Not directly. Its purpose is to show the right language version to the right user. That can indirectly improve user experience and conversions, but it is not a ranking guarantee on its own.
Is adding hreflang for every language enough?
No. The language code must be correct, return links must exist, and the pages must be indexable. Adding tags alone does not solve missing translations or broken addresses.
Does translating a page make hreflang work automatically?
It does not. Even when translation is complete, the set has to be built, codes verified and the page checked after publishing. Skipping these steps can waste the value of the translation.
Conclusion and next step
hreflang is one of the most important agreements a multilingual site makes with search engines. Writing language and region codes correctly, building return links and making a deliberate x-default decision prevent most problems.
As a next step, list every language version of your site. For each one, check the code, the return link and its indexability. Start with the pages that receive the most traffic. A small, regular check often makes more difference than a large one-off restructuring.




No comments yet
Leave a Comment