Skip to main content
Guides

Hreflang: A Practical Guide to Multilingual SEO

Hreflang: A Practical Guide to Multilingual SEO

You search for a brand in Vietnam and Google opens the English page. A visitor in the United States occasionally lands on Vietnamese content. Both pages are indexed and their canonicals look correct. Where is the mismatch?

That is when hreflang deserves attention. It does not translate content or make a page rank by itself. It helps Google understand which URLs are language or regional equivalents so the most suitable version can appear for each searcher.

What is hreflang?

hreflang is an annotation connecting localized versions of the same content. A Vietnamese and English article might use:

<link rel="alternate" hreflang="vi"
      href="https://example.com/blog/huong-dan-seo">
<link rel="alternate" hreflang="en"
      href="https://example.com/en/blog/seo-guide">
<link rel="alternate" hreflang="x-default"
      href="https://example.com/blog/huong-dan-seo">

Three distinctions matter:

  • hreflang is not canonicalization;
  • Google does not rely on hreflang alone to detect page language;
  • an /en/ folder does not establish the relationship by itself.

When does a site need hreflang?

It is useful when:

  • the same subject has complete translations;
  • content uses one language but differs by region, such as en-US and en-GB;
  • primary content remains similar while navigation or support differs by market;
  • ecommerce prices, currency, shipping, or inventory vary by country.

A single-language site gains nothing by adding hreflang for decoration. Pages targeting completely different subjects may be independent rather than alternates.

Three implementation methods

Method 1: HTML tags in the head

This is easy to inspect on HTML sites. Every version lists itself and every other version.

On the Vietnamese page:

<link rel="alternate" hreflang="vi" href="https://example.com/bai-viet">
<link rel="alternate" hreflang="en" href="https://example.com/en/article">

The English page needs the same set. If EN points to VI but VI does not point back, the return relationship is missing.

Method 2: HTTP headers

Headers work for PDFs and other documents without an HTML head:

Link: <https://example.com/guide.pdf>; rel="alternate"; hreflang="vi",
      <https://example.com/en/guide.pdf>; rel="alternate"; hreflang="en"

Method 3: XML sitemaps

Each URL contains xhtml:link children for every version, including itself. This scales to thousands of pages, although files become harder to inspect manually.

Google treats the three methods as equivalent. Using all of them provides no ranking bonus and creates more opportunities for disagreement. Choose the source your team can maintain reliably.

Language and region codes

The language uses ISO 639-1; the optional region uses ISO 3166-1 Alpha 2:

  • vi: Vietnamese without a regional restriction;
  • en: generic English;
  • en-US: English for the United States;
  • en-GB: English for the United Kingdom;
  • fr-CA: French for Canada.

Do not use a country code such as US alone. The first component is always a language. Case is not usually the core issue, but lowercase language and uppercase region makes configuration easier to read.

What does x-default do?

x-default names a fallback when no language or region matches the visitor. It is particularly useful for:

  • country selectors;
  • homepages that ask visitors to choose a language;
  • a global default version.

With only VI and EN, the primary language can be x-default. Do not use x-default instead of an actual language annotation; it supplements vi or en.

How canonical and hreflang work together

Each localized page should canonicalize to itself or to a canonical in the same language.

A coherent setup:

  • /bai-viet canonicalizes to /bai-viet;
  • /en/article canonicalizes to /en/article;
  • both pages connect through hreflang.

A conflicting setup:

  • /en/article canonicalizes to /bai-viet;
  • both are also declared as language alternates.

The canonical asks Google to consolidate EN into VI, while hreflang asks it to preserve both for language targeting.

Seven common hreflang failures

A points to B but B does not point back. Generate annotations from one translation data source instead of writing them manually in each template.

2. Alternate URLs redirect or return 404

Hreflang should name the final valid URL. After a migration, update routes, canonicals, and alternates together.

3. Only the navigation is translated

If the body remains in the original language, Google may treat the pages as duplicates rather than genuine translations. Translate titles, headings, body copy, alt text, and important data.

4. Every version has a different set

The VI page lists VI/EN/JP while EN lists only VI/EN. Every member of one cluster needs the same relationship set.

5. Relative URLs

Use absolute URLs including scheme and hostname. This prevents ambiguity across domains and subdomains.

6. Alternates point to noindex pages

A page that is noindex, blocked, or canonicalized elsewhere is not a useful alternate. Include indexable URLs only.

7. Every English page maps to the Vietnamese homepage

Alternates must be equivalent. An English product maps to the matching Vietnamese product, not a homepage or approximate category.

Design the data so hreflang stays correct

Do not infer translations by replacing /en/ in a URL when slugs can differ. Store a translation group:

translation_group locale slug
article_104 vi hreflang-la-gi
article_104 en what-is-hreflang

At render time, query all records in the group. The same source can power the language switcher, sitemap annotations, and missing-translation reports.

If a translation does not exist, do not point to the homepage. Output only real, indexable locales.

Pre-publish verification

Inspect source HTML

Use View Source or the Meta Tag Checker, not only the JavaScript-rendered DOM. Confirm canonical, lang, and every alternate.

Verify both directions

Open each URL in the cluster. Every page must list itself and all others. With three languages, all three pages contain the same three alternates, plus x-default when used.

Check status and indexability

Every URL returns 200, has no noindex, is crawlable, and names a same-language canonical. Use the Redirect Chain Checker after a URL migration.

Confirm the content is genuinely localized

Title, H1, body, CTA, and FAQs should use the target language. A translated template surrounding an untranslated article is not a multilingual experience.

Monitor Search Console

After release, review URL Inspection and performance by country and page. Hreflang helps selection, but Google may still choose differently when content or canonical signals conflict.

Does hreflang improve rankings?

Not in the sense that adding tags produces a position boost. Its value is preventing wrong-language landings, aligning signals for each version, and improving the search experience.

A thin English page does not become authoritative merely because it is paired with a strong Vietnamese article. Each version still needs useful content, internal links, and unique metadata.

Rolling out hreflang without creating a site-wide incident

Treat hreflang as a data migration, not a template decoration. Begin with one content group where all translations are complete and editorially reviewed. Validate that the translation-group keys resolve to the intended URLs, then release that cohort before expanding.

A safe rollout has four stages:

  1. Inventory: list every indexable URL, locale, canonical, status, and translation-group key.
  2. Completeness: flag groups missing a translation or containing duplicate locale records.
  3. Pilot: publish annotations for one stable section and crawl every member.
  4. Expansion: add sections only after return links and Search Console behavior remain clean.

Build automated checks around the data source. A deployment should fail when one group contains two English URLs, an alternate returns a redirect, or a localized page canonicalizes to another language. This is more reliable than finding errors after Google has already crawled them.

Plan for content lifecycle too. When the Vietnamese article is updated but English translation is pending, decide whether both versions remain useful. Hreflang does not require word-for-word identity, but the pages should still be equivalent answers. If one version becomes obsolete, remove it from every member of the group and return an appropriate status or redirect.

Language switchers should use the same mapping. If the switcher sends users to one URL while hreflang sends crawlers to another, the data model has already split. One translation source for switcher, head tags, and sitemap output reduces that drift.

Finally, monitor by cohort. Compare impressions, wrong-language landings, and selected canonicals for the pilot section. A few weeks of stable behavior is stronger evidence than a syntax validator alone.

Respect the visitor's language choice

Hreflang helps search engines choose a landing page, but the website still needs a usable language switcher. Do not force every visitor into a locale based only on IP address. A Vietnamese speaker traveling abroad may still prefer Vietnamese; an English-speaking customer in Vietnam may want English.

If automatic detection is used, offer a suggestion rather than an irreversible redirect. Keep every localized URL directly accessible, avoid redirect loops between country and language logic, and remember an explicit user choice with a reasonable cookie.

The switcher should link to the equivalent page, not merely the localized homepage. When no translation exists, say so or offer a clear fallback instead of pretending the homepage is the same resource. This protects user trust and keeps the hreflang mapping honest.

Test the experience with cookies disabled, a new browser session, and several Accept-Language headers. SEO annotations can be valid while aggressive redirect middleware prevents crawlers or visitors from reaching the declared URL.

Before entering another market: run a free SEO audit to check canonicals, indexability, and metadata across VI/EN routes.

Conclusion

Hreflang works when translations are grouped in data, each URL self-references, pages return links to one another, and canonicals do not conflict. Correct configuration is almost invisible, but it prevents a highly visible failure: the right content reaching the wrong audience.

Reference: Google Search Central – Localized versions.

Advertisement

Frequently asked questions

Must hreflang be implemented in both HTML and sitemaps?
No. Google treats HTML, HTTP headers, and sitemaps as equivalent methods. Choose the one your team can maintain consistently.
Should an English page canonicalize to its Vietnamese translation?
Not when both are indexable translations. Each version should use a same-language canonical and connect to the other through hreflang.
Is hreflang x-default required?
No, but it is useful for country selectors or a fallback page for visitors whose language does not match a declared version.
#Technical SEO #On-page SEO

Nhận bản tóm tắt SEO checklist qua email

Đăng ký để nhận bản tóm tắt các bước tối ưu SEO quan trọng nhất từ bài viết này.

Check your website for free

Run an SEO audit or check your traffic quality now — no signup required.