Do you run a website in multiple languages, yet Google still shows the wrong language version to visitors — or flags duplicate content in Search Console? The culprit is almost always a misconfigured hreflang attribute. In this guide, we explain how hreflang works and how to set it up without a single error.
When a website exists in multiple languages (e.g. en, de, hr) or targets different countries sharing the same language (e.g. en-US vs en-GB or de-DE vs de-AT), Google should not have to guess which URL to serve. Without a clear map of alternate URLs, search engines often index only one version while treating the others as duplicate content or serving the wrong language to users.
That is what hreflang is for — an HTML or XML signal telling search engines: "This page has language and regional equivalents; show this exact URL to users searching in this language and region."

1. What Is hreflang and How Does Google Choose the Right Version?
Each hreflang tag uses a language code from ISO 639-1 (such as en, de, hr) and an optional country code from ISO 3166-1 Alpha 2 (such as en-GB, de-AT, hr-HR).
hreflang="en"— targets all English-speaking users regardless of country.hreflang="de-AT"— targets German-speaking users specifically in Austria (ideal for local currency, VAT, and shipping).hreflang="x-default"— the fallback URL shown when a user's language or region does not match any specified version.
[!NOTE]
hreflangis a signal, not a directive. If Google detects conflicting signals (such as missing return tags or anoindexdirective), it will ignore yourhreflangannotations.
2. The Golden Rule: Reciprocal Return Tags and Self-Referencing
The #1 reason hreflang fails in practice is missing return tags.
- Every page must reference itself (self-referencing
hreflang). - Every page must list all alternate language versions, and each alternate page must link back.
If /usluge points to /en/services, but /en/services does not point back to /usluge, Google invalidates the entire relationship.
3. Five Common hreflang Mistakes That Hurt International SEO
Mistake #1: Missing Return Tags
Common when a new translation is published manually without updating the <head> or sitemap entries of existing language versions.
Mistake #2: Conflicting canonical and hreflang Tags
If /en/services has <link rel="canonical" href="https://example.com/usluge" /> pointing to another language, you are telling Google the English page is not canonical. Every language version must have a self-referencing canonical tag.
Mistake #3: Invalid ISO Language or Country Codes
Using uk instead of en-GB (uk is Ukrainian!), en-UK instead of en-GB, or hr-CRO instead of hr-HR breaks parsing completely.
Mistake #4: Omitting x-default
Without x-default, visitors from unmapped regions may land on an arbitrary language version.
Mistake #5: Pointing hreflang to 301, 404, or noindex URLs
Every URL inside an hreflang cluster must return HTTP 200 OK and be indexable.
4. Three Ways to Implement hreflang
Method A: HTML <link rel="alternate"> in <head>
<link rel="alternate" hreflang="hr" href="https://example.com/usluge" />
<link rel="alternate" hreflang="en" href="https://example.com/en/services" />
<link rel="alternate" hreflang="de" href="https://example.com/de/leistungen" />
<link rel="alternate" hreflang="x-default" href="https://example.com/en/services" />Method B: XML Sitemap (Best for Large E-Commerce & Multi-Region Sites)
<url>
<loc>https://example.com/en/services</loc>
<xhtml:link rel="alternate" hreflang="hr" href="https://example.com/usluge" />
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/services" />
<xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/leistungen" />
<xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/en/services" />
</url>Method C: HTTP Headers (For PDFs & Non-HTML Assets)
Use the HTTP Link response header for downloadable files like PDFs.
5. Generate Valid hreflang Tags in 60 Seconds with EFORTIS AI
Instead of writing ISO codes by hand, use our free EFORTIS AI Hreflang Generator:

- Open the Hreflang Generator.
- Add each language/region URL (e.g.
hr,en,de). - Enable
x-defaultand select your fallback URL. - Copy the clean HTML or XML output and validate your sitemap in the XML Sitemap Analyzer.
6. Quick Pre-Launch Checklist
- Every URL in the
hreflangset returnsHTTP 200 OK. - Every page has a self-referencing
<link rel="canonical">. - All language versions include reciprocal return tags.
- Valid ISO codes are used (
en-GB,de-AT,hr-HR). -
x-defaultfallback is configured.
Frequently Asked Questions (FAQ)
1. Should I use language-only (en) or language-region (en-GB)?
Use language-only (en) when you have one version for all speakers of that language. Use language-COUNTRY (en-US, en-GB) when you have separate pages for different countries sharing the same language.
2. Can I use HTML hreflang and XML Sitemap hreflang at the same time?
It is best to pick one method consistently across your site to avoid conflicting signals.
3. How long does Google take to process updated hreflang tags?
Typically between a few days and 2–3 weeks depending on crawl frequency.



