Globaprom.

What Is hreflang? HTML Language and Region Attribute, Explained

hreflang is an HTML attribute that tells search engines which language and regional version of a page to show which users. It signals that the /es/ and /fr/ versions of a page are alternates of the same content, not duplicates competing with each other.

The attribute lives in a link tag, an HTTP header, or the sitemap, and it names a language with an optional region: hreflang="fr" for French anywhere, hreflang="fr-BE" for French in Belgium, hreflang="x-default" for the fallback when nothing else matches. Every version in the set points to every other version, including itself. Get one direction wrong and the whole cluster is ignored.

hreflang does not raise rankings on its own. What it does is make sure the right-language page wins the result, so a searcher in Madrid lands on the Spanish version instead of the English one, and Google treats the language variants as one group rather than as duplicate content.

This site runs on it. When Globaprom launched French under /fr/, every translated page gained hreflang alternates automatically, generated from which locales each page publishes in. A localized site without correct hreflang is a common way to have good translations that no one in the target market ever sees. For a business selling into several countries, that gap is the difference between a French page and a page French searchers actually reach.

Why it matters for custom software

The multilingual-ready products we build generate hreflang from the content itself, so alternates stay correct as pages are added or translated. It is the technical layer that connects internationalization in the code to visibility in each market's search results.

Related terms

Related reading