Skip to content

Glossary entry hreflang

hreflang

Link tag declaring language/region variants of a page. It tells engines which version to serve for which locale.

Filed under
Schema

Definition

hreflang is a <link> tag declaring the language and optional regional variants of a page: <link rel='alternate' hreflang='es' href='https://example.com/es/page' />. Search and AI engines use this to serve the right locale variant to each user. Without hreflang, engines may serve the English version to Spanish users (or vice versa), and may treat translations as duplicate content.

Example

An ecommerce site with /en, /es, /fr versions. Each page declares all 3 hreflang variants in <head> so the right one surfaces per locale.

How to optimize

Add hreflang for every locale variant on every page. Use ISO 639-1 language codes + ISO 3166-1 region codes. Add x-default for the fallback locale.

Check a page against a real AI answer

Claude’s live answer to your buyer’s question, its sources, your readiness score and the fixes. Free, no signup, about half a minute.

Run a free audit