Hreflang is a technical hint that tells search engines which language or country version of a page belongs to which visitor. That's particularly relevant for businesses that serve several countries or languages: many websites exist in more than one language, or in separate versions for, say, the UK and Ireland. Without hreflang, Google has to guess for itself which version to show to a searcher in London, Dublin or Paris.
Important to know: hreflang is a signal, not a command. Google says it uses the hint to show the right version, but it can also take other signals into account. Bing mainly uses the language metadata and the content of the page itself.
Each language version of a page refers to all the other versions, including itself. This is done with a code for the language and optionally the country, such as en-gb for English in the United Kingdom, en-ie for English in Ireland or fr-fr for France. You can also set an x-default: the version for visitors who don't match any language, often a language selection page or the English version.
You can add hreflang in three ways: in the head of each page, in the HTTP header (mainly for PDFs) or in your sitemap. Choose one method and stick to it consistently. For smaller sites, the head is usually the simplest; for large sites with many language versions, the sitemap is often easier to manage.
An online store in Manchester sells garden furniture across the UK, Ireland and northern France. There are three versions: /en-gb/ for the UK, /en-ie/ for Ireland with euro prices, and /fr-fr/ with French delivery terms. Without hreflang, Google sometimes shows the UK version to a searcher in Dublin, with different prices and shipping costs. With correct hreflang annotations and an x-default pointing to a language selection page, it becomes much more likely that every visitor gets the version that suits them.
Whether AI assistants such as ChatGPT or Perplexity use hreflang directly isn't publicly known. They do often rely on search indexes, and Google AI Overviews builds on Google Search itself. If you have the right language version in the right place there, you probably also increase the chance that AI answers refer to the appropriate page. Clearly separated language versions, each with a proper URL structure, help avoid confusion in any case.
Hreflang becomes error-prone as soon as your site grows, especially with dozens or hundreds of pages per language. A technical SEO analysis of your multilingual website checks whether all references are correct and confirm each other.
Request your free AI visibility plan. An expert analyses your business and contacts you within 1 working day to present your plan in person.