Skip to content
SEO Madmanby Adam Hafez

Google switches hreflang doc examples to uppercase codes

Google now writes region codes in uppercase in its hreflang examples, such as en-GB, but its documentation says case does not matter to Google.

Published · 2 min read

Written byAdam HafezUpdated
Share
Markdown
A desk globe on a table, evoking international and multi-region targeting

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. 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 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 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 writes reciprocal sets that include each page itself, and our review of hreflang error rates covers which published error figures are actually sourced. Other consumers of your hreflang values are outside what the source covers.

The evidence

Type
announcement
Impact
low
Affects
hreflang, international SEO

Sources

  1. 1.Localized versions of your pages - Google Search CentralPrimary
  2. 2.Google changes hreflang examples to uppercase codes - Search Engine Roundtable, September 23, 2026Primary

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.

About the author

Adam Hafez
Adam Hafez

Founder, UpgradIQ FZC LLC

Adam Hafez works on technical SEO and search measurement: how pages get crawled, indexed, ranked and now quoted by answer engines. He founded UpgradIQ, which reads Google Search Console and GA4 to tie ranking movement back to the changes that caused it. He publishes what the data supports and states the limits of it.

  • Technical SEO
  • Search Console and GA4 measurement
  • Answer engine optimization
  • Structured data

The briefing

Only what actually changed in search, delivered in full by RSS, Atom or JSON feed.

Follow