What is hreflang?

1 min read Last updated: 18 Sep 2026

Hreflang is an HTML attribute that tells search engines which language or country a particular version of a website is meant for. It is used above all on international websites offering content in several languages or for several regions.

It lets Google show the right language or country version in the search results.

How does hreflang work?

With hreflang you tell search engines which version of a page is intended for which users.

Typical examples:

  • de for German-language content
  • en for English content
  • de-at for Austria
  • de-de for Germany
  • en-us for the United States

When someone searches from Austria, Google can then show the Austrian version of a page rather than the German one.

Hreflang is usually implemented in the HTML, in the XML sitemap or in the HTTP header.

Why hreflang matters

It helps avoid duplicate content between language versions and serves the right page to the right audience.

That improves the experience and can strengthen rankings in international markets.

For companies operating across several countries, languages or regional offers, hreflang is an important part of technical SEO.