Websites & SEO

What is hreflang?

Hreflang is an HTML attribute that tells search engines which language and, optionally, which country each version of a page is meant for, so a Spanish speaker sees the Spanish page and a UK visitor sees the UK page.

When you need it

Any site with the same content in several languages, or in one language for different countries (for example, en-gb and en-us with different prices). Each version lists itself and all its alternates, plus an x-default for visitors who match none.

Common errors

Missing return links (page A points to B, but B does not point back), wrong language codes such as en-uk instead of en-gb, alternates that redirect or are noindexed, and machine-translated pages that are too thin to rank on their own.

Questions, answered

Not unless you target several countries with different versions of the same pages.

Yes. For large sites, listing alternates in the XML sitemap is often easier than in every page's head.

By the Stegnor team · Updated