---
title: "Google switches hreflang doc examples to uppercase codes"
url: https://seomadman.com/news/google-hreflang-docs-uppercase-codes
section: news
language: en
published: 2026-09-23T00:00:00.000Z
modified: 2026-09-25T00:00:00.000Z
author: Adam Hafez
topics: ["Technical SEO"]
---

# Google switches hreflang doc examples to uppercase codes

## The short answer

Google changed the hreflang examples in its localized versions documentation from lowercase to uppercase region codes, such as en-gb becoming en-GB, but says the change does not matter. The documentation states the hreflang value is case-insensitive and that Google accepts both forms. Uppercase region codes simply follow the ISO 3166-1 Alpha 2 convention.

## Key takeaways

- Google updated the examples in its localized versions documentation so hreflang region codes appear in uppercase, such as en-GB.
- Google's documentation states that the hreflang value is case-insensitive and that Google accepts lowercase and uppercase codes.
- Writing region codes in uppercase follows the ISO 3166-1 Alpha 2 convention, which is the reason Google gives for the format.
- Existing lowercase hreflang annotations do not need to be rewritten, since Google says both formats are accepted.

Google updated its localized versions documentation so that every hreflang example now uses
uppercase region codes, according to [Search Engine Roundtable](https://www.seroundtable.com/google-hreflang-examples-to-uppercase-codes-42138.html).
An example such as `en-gb` now reads `en-GB`. The same documentation says the case makes no difference to Google.

## What did Google change in the hreflang documentation?

Google's [localized versions page](https://developers.google.com/search/docs/specialty/international/localized-versions)
now shows region codes in uppercase in its hreflang examples. The value format itself is unchanged: the documentation describes
an `hreflang` value made of one or optionally two values separated by a dash, for example `en-US`. The first is a
language code in ISO 639-1 format, and the optional second is a region code in ISO 3166-1 Alpha 2 format.

## Does hreflang case matter to Google?

No. The documentation states that the `hreflang` value is case-insensitive and that Google accepts lowercase and uppercase codes.
It gives a reason for the uppercase examples: formatting region codes in uppercase, for example `en-GB`, follows the
ISO 3166-1 Alpha 2 convention. That is a formatting convention, not a requirement.

## What in the same documentation does matter?

The case change is cosmetic, but the page it sits on sets the rules that decide whether hreflang works at all.
Google accepts annotations in three places: HTML `link` elements, HTTP headers or a sitemap. It calls the three
methods equivalent, so the choice is about convenience for your site.

Each language version must list itself as well as all other language versions. The documentation is blunt about
the cost of skipping that: if two pages do not both point to each other, the tags are ignored. It also recommends an
`x-default` value as the fallback for languages you do not list, especially on language selectors and
auto-redirecting home pages.

Two limits are easy to miss. The documentation names incorrect region codes, such as `UK` instead of `GB`, as a
common mistake, alongside missing return links and incorrect language codes. And Google says it does not use
`hreflang` or the HTML `lang` attribute to detect the language of a page; its algorithms determine that.

## What should you do about existing annotations?

Nothing follows from the documentation change alone. Because Google says both forms are accepted, lowercase annotations that already
work are not made wrong by the new examples. New markup can follow the uppercase convention for consistency with the
[technical SEO](/topics/technical-seo) documentation.

The better use of the moment is a check against the rules above, because missing return links and wrong region
codes are errors the documentation lists, and case is not. Our [hreflang tag generator](/tools/hreflang-tag-generator)
writes reciprocal sets that include each page itself, and our review of
[hreflang error rates](/research/hreflang-error-prevalence-2026) covers which published error figures are actually
sourced. Other consumers of your hreflang values are outside what the source covers.

## Frequently asked questions

### Does hreflang case matter to Google?

No. Google's documentation says the hreflang value is case-insensitive and that Google accepts lowercase and uppercase codes.

### Why did Google switch its examples to uppercase?

The documentation says formatting region codes in uppercase, for example en-GB, follows the ISO 3166-1 Alpha 2 convention.

## Sources

1. [Localized versions of your pages](https://developers.google.com/search/docs/specialty/international/localized-versions) - Google Search Central (primary)
2. [Google changes hreflang examples to uppercase codes](https://www.seroundtable.com/google-hreflang-examples-to-uppercase-codes-42138.html) - Search Engine Roundtable (primary)