What it looks like
Each version lists all the versions, including itself, in its <head>:
<link rel="alternate" hreflang="en" href="https://www.example.com/en/">
<link rel="alternate" hreflang="sv-se" href="https://www.example.com/se/">
<link rel="alternate" hreflang="x-default" href="https://www.example.com/">
Rules that matter
- Use ISO codes: the language first (en, sv, de), then an optional country (en-gb, sv-se).
- Links must go both ways: if page A points to page B, page B must point back to page A.
- Every version should include a reference to itself.
- Use x-default for the page shown to everyone else, such as a language selector.
- Point only to indexable, canonical URLs that return a 200 status code.
Other ways to add hreflang
Instead of tags in the HTML, you can list the versions in your XML sitemap, or in HTTP headers for files such as PDFs. Hreflang is a signal, not a redirect: it doesn’t move visitors, and Google may still show another version if the content isn’t clearly localized.