Skip to content

What is hreflang?

Hreflang is an HTML attribute that tells search engines which language and regional versions of a page exist, so each searcher is shown the right one. Each version lists all its alternates, including itself, with codes such as en-gb or pl, plus an optional x-default for everyone else.

Where it goes

In link elements in the page head, in HTTP headers for files such as PDFs, or in the XML sitemap. Whichever method is used, every page in the set must point to every other page, or the annotations are ignored.

Common mistakes

Missing return links, wrong codes such as en-uk instead of en-gb, alternates that redirect or are not canonical, and pointing every language at the home page. Hreflang does not translate anything; each version still needs real localised content.

Hreflang on website builders

Platforms with built-in localisation, such as Framer and Webflow, add hreflang for their locales automatically. Custom builds have to generate it.

Want this working on your site?

Tell us about your site and what you want it to do, and we will say what we would change first.