Hreflang is an attribute in the code that tells search engines a page has several language or country versions, and which version is meant for whom. Thanks to hreflang, Google can better tell the versions apart and show a Czech user the Czech version, a Slovak user the Slovak version and a German user the German version, even when the content is the same page (just in different languages).
It is an inconspicuous technical element, but on multilingual websites and e-shops it decides whether people get content in their own language or are put off by a version they do not understand. A correctly set up hreflang also solves a problem that Google might otherwise treat as duplicate content. There are certainly other mechanisms today that help language versions appear where they should. Hreflang, however, is still a good standard that lets you play it safe.
Where the word comes from
The name hreflang is a simple compound of the English words href and lang. Href means hypertext reference, the part of the code that carries the target address, just like every anchor text has. Lang is short for language. Put together, it is a link with a language specified. The whole attribute tells the search engine one simple sentence: here is the same content in another language, and you will find it at this address.
A short history of hreflang
Google introduced the hreflang attribute in 2011 as a solution to a growing problem. Companies were expanding abroad and creating language versions of their websites, and the search engine did not know which version to show to whom. It quite often offered the English version to a Czech user, or the other way round.
Hreflang resolved this confusion by clearly linking the individual versions. Since then, it has become the standard for every website targeting several countries or languages, and setting it up correctly is one of the pillars of international SEO.
How hreflang works from an SEO perspective
Hreflang can be specified in three places: in the page head, in the HTTP header, or in the sitemap. The key rule is reciprocity. When the Czech page links to the Slovak one, the Slovak page must link back to the Czech one, otherwise Google ignores the whole connection. Each version also needs to link to itself.
Hreflang works closely with canonical links. Each language version should be its own original, not a copy pointing to another country. A wrong combination of the two is one of the most common and most insidious errors I find during an SEO audit of multilingual websites.

Why hreflang matters
Without hreflang, you risk your language versions competing with each other instead of each one reaching its own market. The German version may show up in the Czech Republic and the Czech one in Austria, and the result is a confused visitor who leaves quickly. That is, of course, an extreme case that will probably not happen. But it is better to make the versions work together than to leave it to chance.
For any website considering expansion abroad, hreflang is therefore almost a necessity, not an add-on. It decides whether your investment in international SEO reaches the right people or fizzles out because the right content reaches the wrong audience. It certainly also helps when entering new countries. But do not expect miracles from hreflang.
Where it goes further
Hreflang is really the technical form of ordinary courtesy: speak to people in a language they understand. It is the same principle that a good customer journey is built on, meeting people where they are and in a form that suits them. And in a world where answers are increasingly put together by artificial intelligence, clear language signals also help AI models, not just traditional search engines, to understand and cite you correctly.
The most common mistakes
- One-way links, where one version links to another but that one does not link back.
- A missing self-referencing link, which is also mandatory.
- A wrong combination with the canonical link, which accidentally merges language versions into one. In general, though, overlapping errors in canonicals and hreflang are not that common.
- Handling languages with location-based redirects instead of hreflang, which prevents the crawler from accessing the other versions at all.
Questions about hreflang
What is hreflang?
An attribute in the code that tells search engines a page has several language or country versions, and which version is meant for whom. Google then shows everyone the right version.
Where is hreflang specified?
In one of three places: the page head, the HTTP header, or the sitemap. In every case, the links between versions must go both ways.
Does every website need hreflang?
No. It only makes sense for websites with several language or country versions. A website in one language for one country does not need it.