What is hreflang?

hreflang is a tag that links the language versions of the same page together and labels each one, so a search engine can show a Spanish reader the Spanish page and an English reader the English one. It only applies to a site that publishes the same content in more than one language, at more than one address.

Why it matters to a shop

Most first sites do not need this, and knowing that saves you a week. You need it when the same page exists in two languages at two addresses: an English menu and a Spanish menu, or a French page for customers in Quebec and a separate one for customers in France. Without the tag, a search engine treats them as two pages competing with the same meaning, and may show the wrong one to a customer standing outside your door with a phone. With it, each reader lands on their own version and stays there.

How to handle it

  1. First decide whether you need it at all. One language, one version, no tag. Translations that swap text at the same address — a language toggle on the page — do not use hreflang either. It links addresses, not toggles.
  2. If you do have separate addresses, give every version a tag naming its language, and make each page list all the versions including itself. A page that points at the others without being pointed back at is ignored.
  3. Use the right codes: en for English, es for Spanish, fr for French, and add a region only when you genuinely serve regions differently (en-GB, es-MX). Then publish, open each address on a phone, and confirm you land on the version you expected. In LocalSite Studio, our desktop app, you can also export the source code and read the tags directly.

Common mistake: Adding hreflang to a single-language site, or to a page that has no other version. It does nothing, and a half-wired pair is worse than no tag at all.