Definition

Hreflang is an HTML attribute that tells search engines which language and regional version of a page to show users in different countries — preventing duplicate content issues across multilingual sites.

Detailed Explanation

<link rel="alternate" hreflang="en-np" href="https://example.com/en-np/page/" />
<link rel="alternate" hreflang="ne-np" href="https://example.com/ne-np/page/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/page/" />

Use ISO 639-1 language codes and ISO 3166-1 region codes. Every hreflang set must be bidirectional — if page A references B, B must reference A. Include x-default for fallback.

Implement via HTML <head>, HTTP headers, or XML sitemap.

Nepal Context

Sites planning Nepali-language content alongside English should implement hreflang before launch — not after both versions are indexed. Common pattern: en-np for English (Nepal audience), ne-np for Nepali, x-default to English.

Practical Examples

  1. English + Nepali blog posts — paired hreflang on both URLs.
  2. Same language, different regions: en-us vs en-gb for global SaaS content.
  3. Validate with a crawler or hreflang testing tool; Search Console retired its International Targeting report in 2022.

How to Check It

  1. View the page source of each language version and confirm all alternates, including itself, are listed with the same set of URLs.
  2. Run a crawler with hreflang reporting (Screaming Frog, Sitebulb) to find missing return links and non-200 targets.
  3. Use URL Inspection in Search Console on each version to confirm it is indexed and not merged into the other language as a duplicate.

Key Takeaways

  • Hreflang = language/region targeting signal, not ranking guarantee.
  • Must be reciprocal between all alternates.
  • x-default catches unmatched users.

Common Mistakes

  1. One-way hreflang — Google ignores non-reciprocal tags.
  2. Wrong language codes — np is country (Nepal), not language; use ne for Nepali.
  3. Hreflang to redirected URLs — must point to 200 OK final URLs.

Nepal guide