1. Define the audience and the equivalent page
Hreflang helps Google choose an appropriate language or regional version. It does not remove a “duplicate content penalty”: ordinary duplication is handled through canonicalization, and translated pages are not automatically duplicates. Keep the language of the main content clear; translating only navigation leaves the reader with the wrong experience.
Create one row per content entity in a translation inventory: article ID, language, final URL, publication state and responsible editor. Match article to article, not article to a language homepage. If a translation is unfinished, omit that alternate until a useful equivalent exists. This inventory becomes the input to both the language switcher and the annotation generator.
2. Separate URL paths from language codes
For Google hreflang, use a supported language code such as en or uk; add a country only when needed, such as en-GB or pt-BR. A country on its own is not a language. The Ukrainian language is uk, while UA is a country code. A /ua/ URL path is fine: the path does not determine the hreflang value. Do not use es-419 as a Google hreflang regional target; use supported country-specific alternatives or language-only es.
Use regional versions when the reader actually gets a different offer, availability, currency or local guidance. Creating identical country pages only to fill a code list adds maintenance work. For a general Ukrainian guide, language-only uk is usually the simpler editorial choice. Keep the HTML lang attribute accurate as well; it serves a separate purpose from alternate-page relationships.
3. Resolve canonical and accessibility conflicts
For distinct translated articles intended to be indexed, a self-canonical on each final URL is a straightforward design. Do not canonicalize every translation to English while expecting all language URLs to remain independently indexed. Where same-language regional pages are duplicates, decide which canonical is preferred before generating the cluster. Google recommends a canonical in the same language, or the closest substitute when that is unavailable.
- Check final status, robots directives and canonical on every target.
- Flag redirects, 404s, noindex and login walls before checking syntax.
- Keep a crawlable language switcher; do not make the only access path depend on location or cookies.
4. Generate one consistent annotation set
Choose HTML head links, HTTP Link headers or an XML sitemap as the maintained implementation. Google treats these methods as equivalent; duplicating them adds reconciliation work. Each version should list itself and its equivalents, with return links. x-default is optional and can identify a suitable fallback or language selector.
Example: the same alternates on both pages
<link rel="alternate" hreflang="en" href="https://example.com/guide/">
<link rel="alternate" hreflang="uk" href="https://example.com/ua/guide/">Example URLs. On each page, add its own canonical separately; do not copy the English canonical onto the Ukrainian page.
5. Validate a cluster, not a single tag
Start with two published equivalents and capture their response HTML. Extract the alternate map from each, compare language-to-URL pairs, then fetch every target. Check a representative page from each template and run the same assertions across the full inventory before release. Save failures as pairs of source URL and target URL so an engineer can reproduce them.
- Release gate: no missing reciprocal pair in the intended cluster.
- Release gate: every listed target resolves to the expected published language page.
- Review gate: the main content is equivalent in purpose, not merely similar in title.
- After deployment: re-fetch production HTML and confirm that the generated set survived the build and CDN.
6. Diagnose the mismatch before adding more tags
If the wrong version appears, inspect the actual page and its canonical selection, translation quality, internal links and alternate targets. Search Console URL Inspection can support an indexing investigation, but a successful inspection is not a complete hreflang audit. Use your own cluster assertions rather than treating the absence of a warning as proof.
For discovery or rendering problems, continue with the JavaScript SEO guide. For conflicting exclusions, use the robots.txt versus noindex workflow. Keep the original URLs stable when correcting annotations unless there is a separate migration requirement.
Primary sources and documentation
Sources
Every changing search, browser, interface or technical-behavior claim in this guide is tied to a current primary source.
- developers.google.com Localized Versions of your Pages | Google Search Central | Documentation | Google for Developers (opens in a new tab)
- developers.google.com Managing Multi-Regional and Multilingual Sites | Google Search Central | Documentation | Google for Developers (opens in a new tab)
- developers.google.com How to Specify a Canonical with rel="canonical" and Other Methods | Google Search Central | Documentation | Google for Developers (opens in a new tab)
- developers.google.com URL Inspection API: index.inspect (opens in a new tab)
Need help diagnosing and implementing the fix?
Need help validating multilingual architecture?
Review translation mapping, canonical signals and deployment checks with Metricum Lab.
Explore technical SEO support




