You've seen codes like en, en-US, and en-GB scattered
across hreflang tags, CMS language settings, and URL folders, and they all look close enough
to be interchangeable. They're not. Two different standards are quietly stacked on top of
each other here, and mixing them up is one of the most common — and most invisible —
mistakes in international SEO.
Get this wrong and nothing crashes. There's no error message. Your site just quietly serves the wrong version of a page to the wrong audience, or search engines ignore your targeting entirely because the code you used doesn't exist.
A language code (like en or fr) says what language content is
written in. A region code (like US or FR) says which country or
territory it targets. Combined with a hyphen, like en-US or fr-CA,
they form a locale code that captures both at once. Language codes come from ISO 639-1;
region codes come from ISO 3166-1 — two separate standards, not one.
What are language codes and region codes?
These are two unrelated classification systems that happen to get combined constantly on the web, which is exactly why they're so easy to confuse.
- Language codes come from ISO 639-1, a two-letter standard where
enmeans English,frmeans French, andjameans Japanese — regardless of where the reader lives. - Region codes come from ISO 3166-1, a separate two-letter standard where
USmeans United States,GBmeans United Kingdom, andBRmeans Brazil — regardless of what language is spoken there. - A locale code joins the two with a hyphen, in the format
language-REGION, likeen-USores-MX, to describe both the language and the regional variant in one tag. - They aren't interchangeable. A region code alone (
US) doesn't tell you the language, and a language code alone (en) doesn't tell you the country — you need both when the distinction actually affects your content.
The practical takeaway: whenever you see a two-letter code, check whether it's describing a language, a place, or both stitched together — they're never the same thing wearing a different label.
Why the distinction matters for your site
This isn't a pedantic naming issue. Getting it right — or wrong — has direct, measurable effects on how your site performs internationally:
- Correct hreflang targeting. Search engines use language and region codes to decide which page version to show a searcher — an invalid or mismatched code means that targeting silently fails.
- Avoiding duplicate content confusion. Serving the same English content to the US, UK, and Australia under one generic
entag can look like duplication when it's actually deliberate, but only if the codes are structured consistently. - Accurate formatting. Region codes drive date formats, currency symbols, and number formatting —
en-USanden-GBdisagree on both the date and the spelling of "colour," despite sharing a language code. - Real audience segmentation. A region code lets you serve different pricing, shipping, or legal text to different countries without needing a different language at all.
UK instead of the correct
region code GB.
Step-by-step: choosing the right codes
- Identify the language the content is actually written in. Not the language you assume your audience speaks — the actual language of the words on the page.
-
Decide whether region matters. If the content is identical for every country that speaks that language, you may only need a language code, like
en, with no region attached. -
Identify the specific region, if it does matter. Use the two-letter ISO 3166-1 country code, not a colloquial abbreviation —
GB, notUK;KR, notKorea. -
Combine them into a locale code. Format it as
language-REGIONin lowercase-uppercase, such asen-US,fr-CA, orpt-BR. -
Apply it consistently across the site. Use the same code in the
html langattribute, hreflang tags, and any URL structure or CMS locale setting for that page. -
Add an x-default, if relevant. If you have a fallback page for visitors who don't match any specific language-region pair, mark it with
x-defaultin your hreflang set. - Validate the final set. Check that every code used actually exists in the ISO standards and that no two tags accidentally point to the same combination.
Common mistakes with language and region codes
1. Using "UK" instead of "GB"
UK is the everyday abbreviation everyone uses in conversation, but it isn't a valid ISO
3166-1 region code. The correct code for the United Kingdom is GB, and using
UK in an hreflang or locale attribute can cause it to be ignored.
2. Treating a region code as if it implies a language
BR means Brazil, not "Portuguese." A code like BR on its own says
nothing about language — it needs to be paired with pt to mean Brazilian
Portuguese specifically.
3. Mismatching language and region without meaning to
A code like en-FR is syntactically valid and means "English content for
visitors in France," which is rarely the intended target — this kind of typo is easy to
make and easy to miss.
4. Using one generic code when regional differences actually exist
Publishing US-specific pricing or spelling under a bare en tag, with no region
distinction, can send the wrong version to UK or Australian visitors who search engines
assumed were covered by the same generic tag.
Real-world examples
How the same language splits into different locale codes depending on the region it's targeting:
In each case, the language code alone would have left out a distinction that genuinely matters to the reader — the region code is doing real work, not just adding decoration.
Language codes vs region codes compared
A side-by-side look at what each standard actually covers, so it's clear which one to reach for.
| Aspect | Language code (ISO 639-1) | Region code (ISO 3166-1) |
|---|---|---|
| What it identifies | The language of the content | The country or territory targeted |
| Format | Two lowercase letters, e.g. en, fr, ja |
Two uppercase letters, e.g. US, GB, BR |
| Used alone for | Content identical across every region | Rarely used alone in web targeting |
| Common pitfall | Assuming one language code covers every regional variant | Using a colloquial abbreviation (UK) instead of the real code (GB) |
| Typically combined into | A locale code, e.g. en-US, fr-CA, pt-BR |
|
Generate valid locale and hreflang codes right now — free
The Rebrixe Locale & Hreflang Code Generator checks your language and region choices against
the ISO standards and outputs ready-to-paste hreflang tags and html lang
attributes. No guessing whether "UK" or "GB" is correct — just pick from a validated list.
Frequently asked questions
en or fr) identifies what
language the content is written in. A region code (ISO 3166-1, like US or
FR) identifies a country or territory. Neither one tells you the other —
English is spoken in dozens of regions, and a single region can have several official
languages.
en-US or pt-BR. It tells software or search engines both the
language and the regional variant, which matters for spelling, currency, date formats,
and content targeting.
GB, not
UK. "UK" is commonly used in everyday writing but isn't the standard code,
and using it in an hreflang or locale attribute can cause validation errors or be
silently ignored.
en is enough. A region code is only
needed when the content itself changes by country, such as different pricing,
spelling, or legal text.
en-CA and fr-CA because
the country has two official languages. Switzerland similarly needs separate codes for
German, French, Italian, and Romansh content aimed at Swiss visitors.
html lang attribute, hreflang tags for
international SEO, URL structures like /en-us/ or /fr-ca/,
and content management settings that control which translated version of a page is
served to a visitor.