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 Google Search Console International Targeting report.

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 codesnp is country (Nepal), not language; use ne for Nepali.
  3. Hreflang to redirected URLs — must point to 200 OK final URLs.