Picture a machinery exporter in Ankara (hypothetical example) that launches a German page for Germany, a separate page for Austria and an English page for British buyers. The team tags the German page with hreflang="ger", the Austrian page with hreflang="de-austria" and the UK page with hreflang="en-UK". None of these three values is valid, and together they can quietly stop search engines from matching each page to the right audience. This guide explains how ISO 639-1 language codes and ISO 3166 region codes fit together, which combinations are correct, and where most teams go wrong. For the wider picture, start with our hreflang complete guide.
Key Takeaways
- An hreflang value has two parts: a language (ISO 639-1, two letters) and an optional region (an ISO 3166-1 alpha-2 country code).
- The region is always a country code. For the United Kingdom the correct value is GB, not UK.
- Add a region only when the audience is genuinely split by country;
deandde-ATsignal different targets. - Use lowercase for the language and uppercase for the country, and keep that format across the whole site.
- Never invent codes. Invalid values cannot be relied on, so test every value with a validation tool before launch.
Language code and region code: two separate questions
An hreflang annotation asks search engines two questions at once: what language is this page written in, and which audience is it meant for? The language code answers the first question and the region code answers the second. The language describes the text; the region names the target country. The same English copy can serve both the United Kingdom and Australia, but the two pages should carry different region codes.
This split matters because many teams assume a region code is mandatory. It is not. Writing only en tells search engines the page suits English readers in general, while en-GB narrows the target to the United Kingdom. How far you narrow the target should follow how much the content really differs between markets.
ISO 639-1: Reading the language part
ISO 639-1 is the international standard that represents languages with two-letter codes. The language part of an hreflang value comes from this list: tr for Turkish, en for English, de for German, fr for French, es for Spanish. The language code is always written in lowercase and can be used on its own.
The most common confusions happen when a language code looks like a country code. uk is the language code for Ukrainian, not for the United Kingdom. The Japanese language code is ja, while jp is the country code for Japan, so writing jp puts a country into the language position. Greek is el, and Greece is GR. Keeping these two systems apart prevents most of the errors you will see in audits.
ISO 3166: The region part is a country
The region part of an hreflang value is a two-letter country code from ISO 3166-1 alpha-2. Germany is DE, Austria AT, France FR, the Netherlands NL, Turkey TR, the United Kingdom GB and China CN. The region slot does not accept continents such as "Europe", language areas, or generic labels such as "global". It always takes a country code.
Three-letter codes from ISO 3166-1 alpha-3, such as DEU, and numeric codes are not used in this position. Writing tr-TUR replaces the correct two-letter code TR with a three-letter value, which makes the annotation invalid.
Correct combinations: en-GB, de-AT and zh-Hant
A correct combination starts with the language code and adds the region code only when it is needed. Three examples cover the most common situations.
en-GB: Same language, different market
English copy can serve both the United Kingdom and Australia. The UK page is marked en-GB and the Australian page en-AU. A generic selector page that sends visitors to the right country can be marked x-default. For how that works in practice, read our hreflang x-default explained guide.
de-AT: German, but for Austria
Austrian readers use German, but prices, some commercial terms and legal wording can differ from German usage. If the content really diverges, mark the Austrian page de-AT. If the text is nearly identical, a single de page or a de-DE page may be the simpler answer. The decision should follow how different the content is.
zh-Hant: Script and language
In Chinese, the writing system matters as much as the language. The BCP 47 standard expresses the script as a separate subtag: Hant for traditional characters and Hans for simplified characters. That makes zh-Hant the value for traditional Chinese text, and it can be combined with a region such as zh-Hant-TW. Which form you choose depends on your audience. If you are unsure, apply one rule across the site and document it.
Common mistakes and how to fix them
Wrong country code: en-UK
The ISO 3166 code for the United Kingdom is GB. Writing en-UK uses a non-standard value in the country position. The fix is simple: en-GB. This error usually comes from hand-written templates and old plugin settings, so scan every template in one pass rather than fixing pages one by one.
Case confusion
Lowercase for the language and uppercase for the region is the common convention: de-AT, zh-Hant-TW. Letter case rarely breaks a validation tool, but using one format everywhere makes audits and team reports far easier to read.
Country code in the language slot
Writing jp for a Japanese page is a frequent mistake. The correct value is ja-JP, where ja is the language and JP the country. Greece follows the same logic: el-GR, not gr. Putting a country code where a language code belongs points search engines to the wrong language.
Unknown or invented codes
Codes that are not on the ISO lists, values that add a place name such as "tr-istanbul", and placeholders such as xx prevent the annotation from being processed reliably. If you are not sure which code to use, check the ISO lists and test the value in a validation tool before it goes live.
Which combination should you choose? A decision table
When you pick a value for a page, first identify its language, then decide whether it targets one country or several. The table below covers the situations that come up most often.
| Situation | Suggested value | Note |
|---|---|---|
| Turkish copy, Turkey as the target | tr-TR | Language and country are both clear |
| Turkish copy for all Turkish readers worldwide | tr | No region added |
| English, United Kingdom | en-GB | GB, not UK |
| English, Australia | en-AU | Separate value if the content is separate |
| German, Austria | de-AT | Separate page if the content differs |
| Traditional Chinese, Taiwan | zh-Hant-TW | Script and country together |
| Selector page with no country focus | x-default | For a country selection page |
Pre-launch checklist
- Is every language code on the ISO 639-1 list, with no three-letter codes?
- Is every region code an ISO 3166-1 alpha-2 country code for a single country?
- Are
GBfor the United Kingdom,JPfor Japan andGRfor Greece used where they apply? - Are language and region separated by a hyphen, with no spaces or underscores?
- Does the paired page return the same codes? For the rules, see our hreflang return tag errors guide.
Putting the codes into practice
Once the codes are right, they have to be written into the HTML head, an HTTP header or a sitemap. The differences between these three methods, and when each one fits, are covered in our guide to hreflang implementation methods. The method does not rescue a wrong code, though. A bad value produces the same result whichever channel delivers it.
Hypothetical example: a machinery exporter in Ankara
Imagine a machinery maker in Ankara (hypothetical example) that opens separate pages for the UK and Australia. At the start the site had one English page, and hreflang used only en. In the new setup the UK page is marked en-GB, the Australian page en-AU, and the generic selector page x-default. Before switching, the team matched every value to its page in a table, which stopped a wrong country code from going live. This is a scenario, not a real company's data.
Fixing an existing site in the right order
When you correct hreflang codes on a live site, the order matters. Check language codes first, then region codes, and finally the return matches between paired pages. That way you do not have to fix the same mistake twice. A correction made in a shared template reaches every page at once, so start with template-level errors and only then move to page-by-page exceptions. Log each change in a simple table: page address, old value, new value and the date of change. That record shows what changed and why when the next audit comes around.
Conclusion and next step
The rule for hreflang codes is simple: the language is an ISO 639-1 code, the region is an ISO 3166 country code, and the region is added only when the content really splits by country. Small fixes such as GB instead of UK, or ja-JP instead of jp, help search engines connect each page to the right market. As a next step, compare every hreflang value on your site with the table above and apply the checklist to each new page. For the wider picture of how these codes fit together across pages, read our international SEO guide on hreflang errors. If you need help applying these codes across your site, you are welcome to talk to the DeltaWeb team.




No comments yet
Leave a Comment