
What Is an Hreflang Tag?
Hreflang links the language and regional versions of a page together. Most small sites do not need it, and the ones that do must follow a few strict rules.
Short answer
An hreflang tag tells Google which language or regional version of a page to show to which searcher. You need it only if the same page exists in more than one version. Each version must list itself and all the others and be linked back, or Google ignores the tags. Add it by 1 of 3 methods: HTML, HTTP header or sitemap.
Do you need hreflang?
You need hreflang when one page exists in more than one language or regional version. You do not need it for a single-language site. Use this table.
| Your situation | Need hreflang? | Why |
|---|---|---|
| One language, one country | No | Nothing to link |
| Greek and English versions of the same pages | Yes | Google must know which is which |
| English pages for the UK and for Cyprus with different prices | Yes | Same language, different regions |
| A blog post that exists only in English | Not for that page | There is no alternate to point to |
| A browser translation widget with no separate URLs | No | There are no separate pages to annotate |
Each language needs its own URL. Google says that you should use different URLs for each language version, rather than changing the language with cookies or browser settings.
What the tag looks like
Here is an illustrative set for a page that exists in English and Greek, with a fallback for everyone else. The addresses are placeholders.
<link rel="alternate" hreflang="en" href="https://example.com/en/services/" />
<link rel="alternate" hreflang="el" href="https://example.com/el/services/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/en/services/" />
The same three lines go in the <head> of both the English and the Greek page. That sameness is deliberate. Each page lists every version, including itself.
The rules that cause most errors
- Return links. If page A points to page B, page B must point back to A. Otherwise Google ignores the tags.
- Self-reference. Each page lists itself as well as the others.
- Full URLs. Include the protocol, such as
https://example.com/foo, not/foo. - Valid codes. Use a language code from ISO 639-1, such as
enorel, and optionally add a region code from ISO 3166-1 Alpha 2, such asGBorCY. A country code on its own is invalid, andUKhas no effect, because the code for the United Kingdom isGB. - A fallback. Use
x-defaultfor the page shown to visitors whose language matches none of your versions. - A catch-all for regional variants. If you have several English versions, such as UK and Cyprus, also provide a generic English page.
- Matching canonicals. Each version's canonical tag should point to a page in the same language, not to a page in a different one.
Three ways to add it
Google treats these as equivalent. Pick one, because using all three gives no added benefit in Search.
| Method | How it works | Best for |
|---|---|---|
| HTML link tags | Elements in the <head> of each page |
Small sites where you can edit page templates |
| HTTP header | A Link: header with the response |
Non-HTML files such as PDFs |
| XML sitemap | Annotations inside each sitemap entry | Large sites, or when editing templates is hard |
Codes for a Cyprus business
These examples assume you serve visitors in Cyprus and elsewhere.
| Audience | Code |
|---|---|
| Greek speakers anywhere | el |
| Greek speakers in Cyprus, if the offer differs | el-CY |
| English speakers anywhere | en |
| English speakers in the UK, if the offer differs | en-GB |
| Anyone else | x-default |
If your .cy or .com choice is still open, our guide on .cy or .com will help. For the strategy that decides which versions to build at all, read international SEO strategy.
Hreflang is not a translation fix
Hreflang tells Google about versions that exist. It does not make a weak version good. Google says localized versions count as duplicates if their main content remains untranslated, and translating only the template, such as menus, around content in another language creates a poor experience. Translate the whole page.
Google also determines a page's language from its visible content, not from the lang attribute or the URL. Keep one language per page and avoid showing two translations side by side.
A ten-minute check you can do by hand
You do not need a tool to test one pair of pages.
- Open the English page, view its source and search for
hreflang. Write down every address listed. - Open each of those addresses in turn. Each must load as a normal page, in the language its tag claims.
- In each page's source, check that the full set of tags is present, including a tag for the page itself.
- Confirm each page lists the English page too. That is the return link.
- Read the codes against the table above. A stray
UK, a country code with no language, or a typo is enough to make Google ignore the line. - Repeat for one more pair on a different part of the site, because a template fault can affect one section only.
If every pair passes, your setup is sound. If a section fails, fix the template once instead of editing pages one by one.
Common errors and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| The wrong language version shows in results | Missing or one-way hreflang | Add return links to every version |
| Tags appear to be ignored | Invalid codes or relative URLs | Correct the codes, use full URLs |
| English page shows for Greek searchers | No el alternate, or no self-reference |
Add the full set to every version |
| A new language was added, nothing changed | Older pages were not updated | Add the new version to every existing page's set |
Free hreflang checkers exist, and they are useful for spotting missing pairs, but verify any finding by viewing the page source yourself.
Next step
List the pages that exist in more than one language on your site, add the full set of tags to each, and test five pairs by hand. Our technical SEO checklist puts this check in context. If you want a hand with a multilingual build, see our SEO service.
Sources
Frequently asked questions
Does hreflang improve my rankings?
Google describes hreflang as a way to tell it about localized versions of a page, not as a ranking boost. Its job is to show the right language or regional version to the right searcher. Without translated main content, Google treats versions as duplicates.
Do I need hreflang for a Greek and English site?
Yes, if the same page exists in both languages. Give each version its own URL and add hreflang to both, using el and en, with a self-reference on each page. Skip it for pages that exist in only one language.
Which is better, HTML tags, HTTP headers or a sitemap?
Google treats the three as equivalent, so choose the one easiest to maintain. HTML suits most small sites, headers suit non-HTML files such as PDFs, and sitemaps suit large sites. Using all three gives no added benefit in Search.
What is x-default in hreflang?
It marks the fallback page for visitors whose language matches none of your versions, such as a language selector or a generic English page. It is optional but Google recommends it when you have several versions.
Why is Google ignoring my hreflang tags?
Common causes are missing return links, a page that does not reference itself, wrong language or region codes and relative URLs. Fix reciprocal links first, because Google ignores tags that the other page does not confirm.
Keep reading
International SEO Strategy
How to plan international SEO from Cyprus: choose a market with evidence, pick a URL structure, translate properly, add hreflang and know when to wait.
5 min read
Technical SEO Checklist
A technical SEO checklist in five ordered stages, with a free way to test each check, what a pass looks like and which popular tasks you can safely skip.
5 min read
SEO Content Strategy
How to plan SEO content that earns enquiries: pick topics from customer questions, give each page one job, use AI safely and update before publishing more.
5 min read
Free auditLet us tell you what to fix first.
Send us your website and we will send back a short, honest audit of what is holding it back.
Request a free audit