Search and SEO
What is hreflang?
hreflang is an annotation telling search engines which language or regional version of a page to show to which audience. It requires genuinely equivalent pages, reciprocal annotations between every version, and a self-reference on each — a cluster missing any of those is discarded.
Also called: hreflang tag · language targeting
The three rules
- Every page in a cluster references every page in the cluster, including itself
- Annotations are reciprocal — if A points at B, B must point back at A
- The pages are genuine equivalents, not merely related
When the right answer is none
A single English site on a generic domain selling into several English-speaking countries needs no hreflang, because there are no alternates. The common failure is declaring hreflang="en" and hreflang="x-default" both pointing at the same URL — technically valid, completely inert, and a sign nobody checked.
Code format
- Language is ISO 639-1: en, fr, de. Region is ISO 3166-1 Alpha-2: GB, CA, IE
- en-GB is valid; en-UK is not, and it is the single most common error
- Language alone is valid; region alone is not
- One x-default per cluster, for users no other annotation matches
Where this is covered in depth
A definition can only go so far. hreflang, and the honest answer that most sites do not need it covers this properly — 2 minutes, free, no email required.
Who wrote this
Anas Bin Masud builds e-commerce sites and does technical SEO for businesses in the UK, Canada and Pakistan. These definitions come from client work rather than from a content brief — where an entry describes a mistake, it is usually one found on a real site. More about how I work.