# hreflang

*Language annotation for pages that exist in more than one language*

An hreflang annotation tells a search engine that two pages are the same document in different languages. It only works when both sides name each other and each one names itself — a one-sided set is discarded for the whole cluster.

**Canonical:** https://spoko.space/glossary/hreflang/  
**Language:** en  
**Category:** SEO and AI search  
**Also known as:** hreflang tag, language alternates, x-default  
**Published:** 2026-09-22  
**Glossary:** https://spoko.space/glossary/

---
## What it is {#what-it-is}

Three `<link>` tags in the head of a bilingual page, or the equivalent in a sitemap. English page says: I am `en`, the Polish one is `pl`, and the fallback for everyone else is this. The Polish page says the same thing about itself.

That mutuality is the entire specification worth remembering. A page that names a counterpart which does not name it back is not a weaker signal — it is an ignored one, and Google drops the annotation for the whole group rather than guessing which half is right.

`x-default` is the page to show a visitor whose language matches nothing on the list. It is not a way to mark your main market.

## Why it matters if you are paying for a website {#why-it-matters-if-you-are-paying-for-a-website}

Because without it the two versions compete. The search engine sees two pages saying much the same thing, picks whichever it likes for every query, and shows Polish results to English readers and the other way around. With it, the pair is one document in two languages and each gets shown to the audience that reads it.

## What I actually see go wrong {#what-i-actually-see-go-wrong}

One-sided pairs, almost every time. Someone adds the annotation to the English page during a translation project and never touches the Polish one, and the whole thing silently does nothing.

It is worth a build gate because the failure is invisible from the inside: both pages render, both deploy, both look finished, and only the link between them is missing. That is how eighteen portfolio pairs on this site — every one of them a real translation sitting in the repository next to its original — shipped unlinked, and nothing in the build had an opinion about it. There is a script now that fails the build on a pair that is one-sided or crossed, and it checks the taxonomy listings too.

The second failure is a pair that points at a redirect or a trailing-slash variant, which is the same as pointing at nothing.

## What hreflang is not {#what-hreflang-is-not}

It is not a ranking factor and it will not make a page rank in a country it has no business ranking in. It also does not replace the canonical: each language version is canonical to itself, and getting that wrong — pointing the Polish page's canonical at the English one — removes it from the index entirely.

## Related terms {#related-terms}

- [canonical URL](https://spoko.space/glossary/canonical-url/): A canonical URL is the address a page names as the real one for its content, so a search engine that reaches it by any other route indexes the named version instead. It is a strong hint, not an instruction, and Google can overrule it. — Markdown: https://spoko.space/glossary/canonical-url.md
- [structured data](https://spoko.space/glossary/structured-data/): Structured data is a block of machine-readable facts added to a page — what it is, who wrote it, what it costs — using the schema.org vocabulary, usually as JSON-LD. Search engines read it to understand the page and sometimes to decorate the result. — Markdown: https://spoko.space/glossary/structured-data.md
- [AEO](https://spoko.space/glossary/aeo/): AEO is the work of making a page usable as a source by systems that answer questions directly — AI assistants and AI overviews — rather than only listing links. The goal shifts from being clicked to being quoted correctly and attributed. — Markdown: https://spoko.space/glossary/aeo.md
- [Google Search Console](https://spoko.space/glossary/google-search-console/): Search Console is the free tool where Google reports what it knows about your site: which queries showed it, where it ranked, which pages are indexed and which are not, and what its crawler found wrong. It is the only first-party source for any of it. — Markdown: https://spoko.space/glossary/google-search-console.md

## Where I write about this {#related-posts}

- [Online PDF Editor](https://spoko.space/online-pdf-editor/) — Markdown: https://spoko.space/online-pdf-editor.md
  Free, privacy-first PDF editor that runs in the browser. Replace text, reorder pages, extract images and convert to Word — no install, no signup. Built with Flask + PyMuPDF on Google Cloud Run.
- [Enhanced WP REST API Plugin](https://spoko.space/enhanced-wp-rest-api/) — Markdown: https://spoko.space/enhanced-wp-rest-api.md
  Open-source WordPress plugin extending REST API for headless CMS. Adds GA4, Polylang hreflang data, relative URLs and headless mode with 301 redirects.
- [Multilingual Corporate Website for an Aluminium Profiles Manufacturer](https://spoko.space/profile/) — Markdown: https://spoko.space/profile.md
  Multilingual corporate website showcasing Grupa Kęty's Extruded Products Segment — aluminum profiles, products and services.
- [Magento Open Source End of Support: A Complete Guide to the Decision You Need to Make in 2026](https://spoko.space/blog/magento-open-source-end-of-support/) — Markdown: https://spoko.space/blog/magento-open-source-end-of-support.md
  Adobe isn't shutting down Magento tomorrow — but for Open Source, extended support never existed. Real timeline, costs, regional integrations, migration plan, and the fourth option nobody talks about.

## See also {#see-also}

- [AI visibility audit](https://spoko.space/ai-search-audit/)

## Sources {#sources}

- [Localized versions of your pages](https://developers.google.com/search/docs/specialty/international/localized-versions) — The rules, including the return-link requirement and x-default.
