Skip to the indexed answers
Digital Marketing Index

usdigitalmarketingindex.com SEO

How should hreflang distinguish English pages targeting different countries?

With a language code followed by a region code, one annotation for each country version, listed identically on every version. A page for readers in the United Kingdom is labeled en-GB, a page for the United States en-US, and each page carries the full set, including a reference to itself. Google’s documentation describes this case as one where annotations are recommended: content with “small regional variations with similar content, in a single language”, with the example of English content for the US, GB, and Ireland (Google’s documentation on localized versions of pages). The annotations tell Google which version suits which searcher. They do not decide whether a page is indexed.

Language-region codes

The format rules, from the documentation:

Rule Detail
Language code ISO 639-1 format, such as <!–INLINECODE2–>
Region code Optional, ISO 3166-1 Alpha 2 format, such as <!–INLINECODE3–>
Order Language first, then region, separated by a dash: <!–INLINECODE4–>
Country alone Not allowed. The documentation warns: "You can't specify the country code by itself"
Language alone Allowed: <!–INLINECODE5–>
Case Not significant to Google; uppercase region codes follow the ISO convention
Unsupported codes Codes not in those standards are not supported; the documentation's example is <!–INLINECODE6–>

One error follows directly from the region standard. The code for the United Kingdom in ISO 3166-1 Alpha 2 is GB. en-UK is not a valid value.

Sample hreflang tags for two English markets, with a general English version. The pages differ in currency, spelling, delivery terms, and contact details.

<link rel="alternate" hreflang="en-GB" href="https://www.example.com/en-gb/boiler-cover/" />
<link rel="alternate" hreflang="en-US" href="https://www.example.com/en-us/boiler-cover/" />
<link rel="alternate" hreflang="en" href="https://www.example.com/en/boiler-cover/" />

The third line is the catch-all the documentation advises: where several URLs target the same language in different locales, “it’s a good idea to also provide a catchall URL for geographically unspecified users of that language”. Without it, an English speaker in a country with no version of their own has no designated page.

Alternate return links

Two requirements govern the set.

  • “Each language version must list itself as well as all other language versions.”
  • “If two pages don’t both point to each other, the tags will be ignored.”

So the three lines above appear, unchanged, in the head of all three pages. The UK page lists itself, the US page, and the general page. The US page lists the same three. The set is identical everywhere.

Further rules:

  • URLs are fully qualified, with the protocol: https://www.example.com/en-gb/boiler-cover/, not a relative path.
  • Alternates may be on different domains.
  • Each URL in the set is the specific equivalent page, not the section home page.
  • Every URL listed must be a live, indexable page.

The documentation offers three places to put the annotations: HTML link elements in the head, HTTP headers, and the XML sitemap. Use one method consistently for a given set of pages.

Annotations tell Google which version suits which searcher. Forcing the choice on the visitor by redirecting on IP address is a different technique with its own problems, set out in the guide to why automatically redirecting visitors by IP address can cause international SEO problems.

Canonical coordination

Same-language country pages resemble each other closely, which raises the question of duplicates. Google’s multi-regional guidance addresses similar content in the same language on different URLs and says to pick a preferred version and use the canonical element and hreflang so that the correct language or regional URL is served to searchers. Its example is two URLs that show similar content in one language. Picking one version fits that case, where the pages are copies for the same audience.

The combination that works for versions meant to be shown in their own countries:

Element UK page US page
Canonical tag Itself Itself
hreflang set en-GB, en-US, en en-GB, en-US, en

What breaks it:

Mistake Effect
The US page's canonical points to the UK page The US page declares itself a duplicate; its hreflang entry now names a non-canonical URL
hreflang lists a URL that redirects The alternate is not the final page
hreflang lists a <!–INLINECODE9–> page The alternate cannot be shown
hreflang lists parameter or tracking URLs The alternates are not the canonical addresses

hreflang entries should name canonical URLs, and canonical tags should not point across country versions that are meant to coexist.

If two country pages are truly identical, with no difference in price, terms, spelling, or contact details, ask whether both are needed. Annotations describe versions that exist for a reason. They are not a justification for creating them.

Validation examples

A correct set and three faulty ones.

Correct, on every page of the set:

<link rel="alternate" hreflang="en-GB" href="https://www.example.com/en-gb/boiler-cover/" />
<link rel="alternate" hreflang="en-US" href="https://www.example.com/en-us/boiler-cover/" />
<link rel="alternate" hreflang="en" href="https://www.example.com/en/boiler-cover/" />

Faulty: invalid region code.

<link rel="alternate" hreflang="en-UK" href="https://www.example.com/en-gb/boiler-cover/" />

Faulty: country without language.

<link rel="alternate" hreflang="US" href="https://www.example.com/en-us/boiler-cover/" />

Faulty: relative URL, and the page does not list itself.

<link rel="alternate" hreflang="en-US" href="/en-us/boiler-cover/" />

Checks:

Check Method Pass condition
Codes Read each value Valid language, valid region, correct order
Self-reference Each page's set includes its own URL Present
Reciprocity For each pair, both pages list each other Both directions
Identical sets Compare the sets across versions Same lines
URL status Request each listed URL 200, no redirect
Canonical Read each page's canonical Self, and equal to the URL in the hreflang set
Indexability No <!–INLINECODE10–>, not blocked Indexable
Rendered output View the served HTML head Annotations present before scripts
Outcome Search from each country, or use the performance report filtered by country The country's version receives that country's impressions

Set expectations about what the annotations do. The documentation says they “help Google Search point users to the most appropriate version”. They inform which URL is shown to a searcher. Indexing, ranking, and canonical selection have their own signals, and a page can be annotated correctly and still not be the one Google shows.

For visitors whose language or country matches none of the listed versions, a further value exists, described in the guide to the purpose of an x-default hreflang annotation.

The rule: language then region, valid codes, a general-language catch-all, every version listing every version including itself, and canonicals that agree.

Link trail

Reader comments on this answer

Add your comment to this answer

Your email address will not be published. Required fields are marked *