Deutsch
hreflang & language tags

Country code (ISO 3166-1)

Also known as: ISO 3166-1

A country code under ISO 3166-1 is a standardized identifier for a country or territory. In everyday speech, “country code” can also mean a telephone dialing code (assessment). In SEO the ISO code matters, because it is the region part of hreflang values.

Formats

ISO 3166-1 defines three formats. According to Wikipedia, the standard is maintained by the ISO 3166 Maintenance Agency and covers 249 assigned codes.

Country Alpha-2 Alpha-3 Numeric
Germany DE DEU 276
United Kingdom GB GBR 826
United States US USA 840

The alpha-2 code is the one used in hreflang. Wikipedia notes that some codes are reserved on request, for example UK for the United Kingdom, while the assigned code is GB.

Country codes in hreflang

Google’s hreflang format takes a language code, followed by an optional region code in ISO 3166-1 Alpha 2 format. A region cannot stand alone. Google accepts upper and lower case and follows the ISO convention of uppercase region codes, as in en-GB. Reserved values such as UK, EU and UN are ignored.

Example

HTML
<link rel="alternate" hreflang="de-DE" href="https://example.com/de-de/" />
<link rel="alternate" hreflang="de-AT" href="https://example.com/de-at/" />
<link rel="alternate" hreflang="en-GB" href="https://example.com/en-gb/" />

Common mistakes

  • Country code alone. According to Google, specifying only the region (DE) is not valid. The value starts with the language code, such as de-DE.
  • Reserved codes. UK, EU and UN have no effect in Google Search, says Google. The code for the United Kingdom is GB.
  • Regions outside the standards. Google does not support codes such as es-419 that are not listed in the standards.

FAQ

What is the ISO 3166 code for the USA? US as alpha-2, USA as alpha-3 and 840 as numeric code.

Is UK a valid country code? Wikipedia lists UK as reserved on request of the United Kingdom, while the assigned code is GB. Google ignores UK in hreflang.

Sources

  1. ISO 3166-1 – Wikipedia (secondary; iso.org returned HTTP 403)en.wikipedia.org
  2. ISO 3166 country codes – ISOiso.org
  3. Standard country or area codes for statistical use (M49) – United Nations Statistics Divisionunstats.un.org
  4. Tell Google about localized versions of your page – Google Search Central (updated 21.09.2026)developers.google.com

Last updated: