Hreflang

Hreflang is a short line of code that tells Google which language version of a page to show each visitor, so nobody lands on a page they cannot read.

Also known as hreflang tag language tags multilingual SEO

Definition

Hreflang is a short line added to the code of a page, and it tells Google that the page has a twin in another language. It also points to where that twin lives, so the search engine can pair the two instead of guessing. Nothing changes on the screen, because the line is a note for Google rather than for the reader.

The everyday case is a site in Arabic and English, where the same page sits at two addresses, one under /ar/ and one under /en/. Without hreflang, Google has to guess between them, so it often shows the wrong one. Worse still, it may treat the two as copies of each other and keep only one of them in its results. With the tags in place, a person searching in Arabic gets the Arabic page and a person searching in English gets the English one.

The tags come in sets, so every page in the set has to name every other page, including itself. Leave that return line off one page and Google drops the whole group, which undoes the work on all of them. You can also name a country, such as ar-sa and ar-eg, but only when the price, the stock or the phone number really differs. Two identical pages under two country codes give a search engine nothing to choose between, so the extra tags earn nothing.

The worst mistake is deciding a visitor's language from where they are sitting. Someone in Germany opens an Arabic link a friend sent, lands on a German page, and leaves, because she came for one thing and found another. It is also a quiet way to hide half your site, because Google's crawler usually visits from the United States and sees only the English version. Linkysoft removes that redirect from sites that cannot work out why their Arabic pages never appear. Offer the choice instead, put the switch where people can find it, and remember what they picked.

None of this pushes a page up the results on its own. What it does is make sure the right version is the one that shows, which is a far cheaper win. So when Linkysoft plans a multilingual website, the address pattern and the language switch are agreed before the first screen is drawn, because changing them later means changing every address. The same habit carries into every web application we build, where the customer's language is saved with their account instead of guessed from their connection.

Questions about Hreflang

Does hreflang improve my ranking?
Not on its own. It decides which language version appears, so fewer people land on a page they cannot read and leave. That helps, but it is not a push up the list.
Do I need hreflang if my site has one language?
No. It only matters when the same page exists in more than one language, or in more than one country version of the same language.
Should my site pick the visitor's language automatically?
No. Guess wrong once and the reader gets a page in a language they do not read. Show a clear language switch, remember the choice, and let the visitor decide.
Where exactly do the hreflang tags go?
In the head of each page, or in the sitemap file. Either place works. Pick one, keep to it, and make sure every page lists itself and all its twins.
Can I let the browser translate my pages instead?
You can, but that translated page is not yours and Google will not list it. Your prices, delivery terms and product names get guessed at, and nobody checks the result.

Still not sure how this applies to your project?

Tell us what you are building and we will answer in plain language.