Hreflang Best Practices and Mistakes to Avoid
Most hreflang problems come from four avoidable mistakes: missing return tags, wrong locale codes, forgetting x-default, and mixing implementation methods. Get those right and search engines will confidently serve the correct language version instead of ignoring your annotations. This is a practitioner's checklist, not a beginner walkthrough.
The return-tag rule that breaks the most sites
Hreflang must be reciprocal and self-referential. If /en/ lists /de/, then /de/ must list /en/ β and both must list themselves. Google treats a one-way reference as untrusted and may discard the whole cluster. The practical habit: generate one complete tag block that includes every version plus itself, then paste the identical block into the head of every page in the set. When each page carries the same full list, reciprocity is guaranteed by construction rather than by memory.
Locale codes: the errors that pass review but fail crawling
| Wrong | Right | Reason |
|---|---|---|
| hreflang="gb" | hreflang="en-GB" | Region can't stand alone; language is required |
| hreflang="en-UK" | hreflang="en-GB" | UK isn't the ISO code; GB is |
| hreflang="en_us" | hreflang="en-US" | Hyphen separator, not underscore |
| hreflang="cn" | hreflang="zh" or zh-Hant | Language is zh; cn is a region |
| hreflang="eng" | hreflang="en" | ISO 639-1 is two letters |
Language uses ISO 639-1 (two letters), optionally followed by a region in ISO 3166-1 Alpha-2. Case is not validated by crawlers, but keeping language lowercase and region uppercase (en-GB) is the readable convention. A generator that offers a locale dropdown removes most of these typos before they ship.
Using x-default the way Google intends
x-default marks the page for users whose language or region matches none of your listed versions β usually a global landing page or a language selector. Two tips: include it in every hreflang cluster, and remember it can point to the same URL as one of your language versions (for example your English home page serving as the global fallback). Skipping x-default is not an error, but it leaves the fallback choice to Google's guess instead of your intent.
Pick one delivery method and troubleshoot systematically
Hreflang can live in HTML <link> tags, HTTP Link headers, or an XML sitemap. All are valid, but mixing them across pages makes debugging painful. Choose one β HTML head tags are the most common and the easiest to audit. When Search Console reports errors, work in this order:
- "No return tags": confirm the target page links back and includes itself.
- Duplicate language codes: the same code used twice in one cluster invalidates that annotation β catch these before publishing.
- Relative URLs: hreflang requires absolute, fully-qualified URLs including the protocol.
- Redirects/noindex targets: hreflang should point to indexable 200-status pages, not redirects.
The generator's duplicate-locale warning and URL validation catch the two most frequent pre-launch mistakes automatically.
Try the Hreflang Tag Generator β free and 100% in your browser.
FAQ
Why does Search Console say my hreflang has no return tags?
The page you point to does not point back to the current page (or does not include itself). Fix it by ensuring every page in the cluster carries the same complete tag list, self-reference included.
Do I need a separate x-default if I already list en?
Not strictly, but adding x-default lets you control which page non-matching users see instead of leaving it to the engine. It can safely reuse your English or global home page URL.
Can I combine country and language, like fr-CA and fr-FR?
Yes β that is exactly what regional targeting is for. Just ensure each variant is a distinct URL and every variant is listed reciprocally across the whole set.
Is it a problem to have hreflang in both the sitemap and the head?
Redundant methods can conflict and complicate debugging. Standardize on one. If you already use HTML tags, keep hreflang out of the sitemap to avoid mixed signals.
Related free tools
- Canonical Tag Generator β pair canonicals with hreflang correctly.
- XML Sitemap Generator β build clean sitemaps for each locale.
- Meta Tag Generator β round out on-page SEO tags.
- Robots.txt Generator β control crawling across regional paths.
Built by ByteVancer
ByteTools is a free product of ByteVancer, a software and web development studio building web apps, SaaS and custom software. Rolling out a multilingual site or scaling international SEO into a full platform? Explore how ByteVancer can help.
Recommended reading
Hreflang Tags Explained: A Guide for Multilingual SEO
Learn how hreflang tags serve the right language version to each user, avoid the common return-tag mistake, and generate them free online.
Hreflang Use Cases: When You Actually Need It
Real hreflang scenarios with worked examples: same-language regional variants, translated stores, currency pages and shared content across country sites.
XOR Cipher Use Cases: CTFs, Learning, and Puzzles
Real use cases for the XOR cipher, from CTF challenges and teaching bitwise logic to lightweight obfuscation, with concrete worked examples.
XOR Cipher Tips: Keys, Security, and Common Mistakes
Pro tips and common mistakes for the repeating-key XOR cipher: key length, reuse pitfalls, format choices, and when to switch to real encryption.