Technical SEO · Advanced

Hreflang

Hreflang is an attribute that tells search engines which language and regional versions of a page exist, so they can show searchers the right one, for example English for India and English for the UK.

Level
Advanced
Format
Language code, optionally with a region: en, en-IN, en-GB
Placement
HTML link tags, HTTP headers or the sitemap
Fallback
x-default
Check it free
Meta Tag Checker

What is hreflang?

When you have versions of a page for different languages or regions, hreflang annotations link them together so search engines can serve the right one:

<link rel="alternate" hreflang="en-in" href="https://example.com/in/">
<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/">
<link rel="alternate" hreflang="x-default" href="https://example.com/">

Best practices

  1. Every version lists all versions, including itself.
  2. Annotations must be reciprocal: if A points to B, B must point to A.
  3. Use valid ISO language (and optional region) codes.
  4. Add x-default for visitors who match none of the versions.
  5. Keep each version's canonical pointing to itself.

Common mistakes

  • Missing return links, which make Google ignore the pair.
  • Using country codes alone ("in" instead of "en-IN").
  • Canonicalizing all versions to one language.

Frequently asked questions

Do I need hreflang for one language?

No. It's only for sites with the same content in several languages or regional variants.

Browse the glossary

Chat on WhatsApp