hreflang Setup for Multi-Regional SEO
hreflang is an attribute for specifying language and regional versions of a page. Without it, Google shows irrelevant versions: Russian speakers from Kazakhstan get Ukrainian version, German users get English instead of German. Proper setup requires understanding several non-obvious nuances.
Syntax and Implementation Variants
Tag is set three ways: via <link> in <head>, via HTTP header Link, or via XML Sitemap. For HTML pages standard variant is tags in <head>:
<link rel="alternate" hreflang="ru" href="https://example.com/ru/" />
<link rel="alternate" hreflang="en" href="https://example.com/en/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
Each page should link to itself and all other versions. If page doesn't have Ukrainian version — it should still link to existing variants. x-default is fallback for regions and languages with no specific page.
Typical Implementation Errors
Asymmetric links — most common: page /ru/about/ declares hreflang to /en/about/, but /en/about/ doesn't reciprocate. Google requires reciprocity.
Wrong language codes — using ru-ru instead of ru-RU or UA instead of uk. Google rejects incorrect codes. Correct BCP 47 codes: ru, en, de, uk, fr, pl.
Missing x-default — for geo-targeting sites without x-default Googlebot doesn't understand which page to show irrelevant regions.
Implementation in XML Sitemap
For large sites maintaining hreflang in HTML template is inconvenient. Better via Sitemap. All page versions must be present in file with full set of xhtml:link.
Auto-Generation on Server
For 1000+ pages with multiple locales, manual maintenance is error source. Generate at application level using framework-specific tools.
Regional Targeting vs Language
Important to distinguish two scenarios:
Languages only — one site, different language versions. ru, en, de. No regional targeting.
Languages + regions — different content for different countries on same language. ru-RU for Russia, ru-UA for Ukraine, ru-KZ for Kazakhstan.
Validation
Check correctness via:
Google Search Console — "Internationalization" section shows hreflang errors Screaming Frog — crawls site and checks reciprocity in Internationalisation section Automated Python check — verify symmetry and reciprocity
Timeline
Audit and fix existing hreflang for up to 500 pages — 2–3 working days. Implementation from scratch including code generation and XML Sitemap — 3–5 days depending on CMS/framework. For non-standard structures add 1–2 days for testing.







