- Category
- Technical SEO
- 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
- Every version lists all versions, including itself.
- Annotations must be reciprocal: if A points to B, B must point to A.
- Use valid ISO language (and optional region) codes.
- Add x-default for visitors who match none of the versions.
- 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.