Hreflang

Hreflang

Definition

The hreflang attribute is an HTML instruction that tells search engines the language and region a page targets. It ensures users see the right version of a multilingual or multi-country site. Example: <link rel="alternate" hreflang="fr-fr" href="..." />.

Why it is critical

Without correct hreflang, Google may show the English page to a French visitor or, worse, treat two versions as duplicate content. For a B2B SaaS vendor selling to multiple markets, hreflang directly impacts conversion and international SEO.

Best practices

  • Use ISO 639-1 language codes (fr, en) and ISO 3166-1 alpha-2 country codes (fr, gb, us)
  • Include a self-referencing tag on each page
  • All versions must reference each other (reciprocity)
  • Add an x-default tag for the fallback version
  • Stay consistent with the canonical tag: the canonical should point to the version in the same language
  • Hreflang can also live inside the XML sitemap for large sites