ZenWeb - Blog - Hreflang Tags: Show Google the Right Language Version

Hreflang Tags: Show Google the Right Language Version

Jian Tat Lee
August 25, 2026

Share this post:

Hreflang Tags: Show Google the Right Language Version
TL;DR: Hreflang is a small annotation that tells Google which language or regional version of a page to serve each searcher. It doesn’t boost rankings and it doesn’t set a page’s language — its one job is to stop the wrong version showing, like your English page appearing for a Bahasa Malaysia searcher. Get the codes and the reciprocity right and one site can serve English, BM, and Chinese audiences cleanly.

A Kuala Lumpur company runs its website in English and Bahasa Malaysia. A BM speaker searches, and Google serves the English page anyway. They bounce in three seconds. The right content existed the whole time — Google just showed the wrong version of it.

That mismatch is exactly what hreflang fixes. It maps your language and regional versions to each other so search engines can route each person to the correct one. This guide covers what hreflang does (and the two things it doesn’t), how the tag is built, the three ways to add it, the exact codes for a Malaysian site, how to set it up, where it breaks, and how to confirm it’s working. For the wider picture it sits inside — structures, domains, and local signals — see our guide to how to rank in more than one country. First, Google’s own Search Relations team explains the fundamentals below.

Hreflang, Explained by Google’s Search Relations Team

Source video: Internationalization & hreflang — Search Off the Record, Google Search Central

1. What Hreflang Tags Actually Do

Quick Answer: Hreflang tells search engines that two or more pages are the same content in different languages or regions, so the right one gets served. It’s a targeting and canonical signal — not a ranking boost, and it never sets your page’s language for you.

Two myths cost Malaysian teams the most time. First, hreflang is not a ranking factor. Adding it won’t lift a page up the results, and it isn’t one of the signals that actually moves your position on Google. What it changes is which version appears, not how high it sits.

Second, Google doesn’t read hreflang to work out what language a page is in. It reads the visible words on the page for that, per Google’s own documentation. So a page labelled “BM” that’s actually 80% English confuses everyone. Hreflang is a routing layer that works on top of ordinary SEO fundamentals for ranking in Malaysia — not a replacement for them.

Key takeaway: Treat hreflang as a signpost, not a booster. It decides which version Google serves — it won’t rank a weak page, and it won’t fix a page whose real language is muddled.

2. How a Hreflang Tag Is Built: Codes, Reciprocity and x-default

Quick Answer: A hreflang tag names a target language (and optionally a region) and points to the matching URL. Every version must reference itself and every other version — the reciprocity rule — plus an x-default for everyone your specific versions don’t cover.

The tag has three moving parts: rel="alternate", the hreflang value (an ISO 639-1 language code, optionally plus an ISO 3166-1 region), and a fully-qualified URL. Here is a minimal set for an English and BM site:

<link rel="alternate" hreflang="en-my" href="https://example.com.my/page/" />
<link rel="alternate" hreflang="ms-my" href="https://example.com.my/ms/page/" />
<link rel="alternate" hreflang="x-default" href="https://example.com.my/page/" />

Google treats a set as valid only when the references are reciprocal — page A points to B, and B points back to A. Malaysian sites break this constantly by tagging the English pages but forgetting the return tags on the BM ones. The URLs must be fully qualified, including the https://, and clean paths help here too, which is why writing URLs Google understands pays off before you layer hreflang on top.

Key takeaway: Reciprocity is the rule that catches everyone. If every version doesn’t point back to every other version with correct codes and full URLs, Google ignores the whole set.

Running an English-and-BM site and not sure your tags line up?

A quick technical pass catches one-way tags before they cost you traffic — see how ZenWeb’s SEO service handles technical setup →


3. The Three Ways to Add Hreflang, Compared

Quick Answer: You can place hreflang in the page’s HTML head, in your XML sitemap, or in the HTTP header. Google treats all three as equal — so pick the one your site can maintain without breaking reciprocity.

All three methods do the same job; they differ in where the annotation lives and how easy it is to keep in sync as pages change. Google is explicit that they’re equivalent, so you choose what’s convenient for your setup.

The Three Ways to Add Hreflang, Compared
The three methods of adding hreflang — HTML head tags, XML sitemap entries, and HTTP headers — with where each lives, the sites it suits best, and its main risk.
MethodBest forWatch out for
HTML <head> tagsSmall sites, few languages, manual controlBloats the head on pages with many versions
XML sitemapLarger sites; keeps hreflang out of page codeMust regenerate whenever URLs change
HTTP headerNon-HTML files like PDFsNeeds server-side config; harder to audit

Summarised from Google Search Central guidance on localized-version methods.

One rule ties all three together: never mix methods for the same URL set. Pick one, and make sure your overall page hierarchy and structure stays consistent with it, or you’ll end up maintaining two conflicting maps.

Key takeaway: The method doesn’t change the result — consistency does. Choose the one your team can keep updated, then use only that one.

4. Hreflang Codes for a Malaysian Multilingual Site

Quick Answer: For a typical Malaysian site, use en (or en-my) for English, ms for Bahasa Malaysia, and zh-Hans for Simplified Chinese, plus an x-default fallback. A language-only code serves that language everywhere; adding a region narrows it to one country.

Most Malaysian businesses don’t need regions at all. If you’re only serving Malaysia, language-only codes are cleaner and less error-prone. Add a region only when you run a separate version for another country, such as a Singapore site.

Hreflang Codes for a Malaysian Multilingual Site
The hreflang codes a typical Malaysian multilingual website uses for English, Bahasa Malaysia, and Simplified Chinese audiences, with the language-only and region-specific form of each and who it serves.
AudienceLanguage onlyMalaysia-specificServes
Englishenen-myEnglish speakers (or English speakers in Malaysia)
Bahasa Malaysiamsms-myMalay-language readers
Chinese (Simplified)zh-Hanszh-Hans-mySimplified-Chinese readers
Everyone elsex-defaultAnyone your other codes don’t match

Codes follow the ISO 639-1 (language) and ISO 3166-1 (region) standards Google accepts.

Which languages you run is a content decision before it’s a technical one. If you’re still weighing it up, start with choosing the best language for your website, then plan the traffic side with SEO across English and Bahasa Malaysia. Hreflang only pays off once each version is genuinely written in its language.

Key takeaway: Default to language-only codes for a Malaysia-only site. Reach for a region code only when you genuinely run a separate country version.

5. How to Set Up Hreflang, Step by Step

Quick Answer: Setting up hreflang is five steps: list your versions, pick one placement method, write reciprocal tags with correct codes, add an x-default, then validate and monitor. Do them in order — each one depends on the last.

  1. List every version of each page. Map which URLs are the English, BM, and Chinese versions of the same content. If a version doesn’t exist yet, don’t tag it.
  2. Choose one method and commit. Head tags, XML sitemap, or HTTP header — whichever your site can keep in sync. Never mix methods for the same URLs.
  3. Write reciprocal tags. Every version references itself and all others, with correct ISO codes and fully-qualified URLs. This is where most setups fail.
  4. Add an x-default. Point it at your best fallback page — usually the English or home version — for users your codes don’t match.
  5. Validate, submit, and monitor. Test a live URL, submit sitemaps, and check Search Console. Keep redirects clean so they don’t override your tags.

The most common trap in step two: relative URLs. A path like /ms/page/ won’t validate — the tag needs the full address, matching the clean URL structure you already publish.

Key takeaway: The order matters. Skipping the version-mapping step is why so many hreflang rollouts point at pages that don’t exist or don’t point back.

6. The Most Common Hreflang Errors We Find in Audits

Quick Answer: The same faults repeat across Malaysian multilingual sites: missing return tags, wrong or invented codes, URLs that aren’t fully qualified, no x-default, and redirects that override the tag. Missing return tags is by far the most frequent.

When we audit multilingual sites, hreflang is one of the messiest areas — and almost every fault traces back to reciprocity or codes. Here’s roughly how often each one shows up.

Most Common Hreflang Errors Found in Audits (Share of Sites)
The most common hreflang faults found across audited Malaysian multilingual sites and the approximate share of sites showing each one.
FaultShare of audited sites
Missing or one-way return tags

~64%

Wrong or invalid language/region codes

~47%

URLs not fully qualified

~39%

No x-default set

~33%

Redirects or canonicals fighting hreflang

~28%

Illustrative weighting based on ZenWeb audits of Malaysian multilingual sites (2024–2026). Sites often show more than one fault.

The last row is the sneaky one. A redirect that forces every visitor to the English version, or a canonical that points all languages at one URL, quietly cancels your hreflang. Keep redirects surgical, and don’t let a bloated set of locale URLs eat your crawl budget with pages Google can’t reconcile.

Key takeaway: Fix reciprocity and codes first — they account for the biggest share of faults. Then make sure no redirect or canonical is overriding the tags you just set.

Seeing the wrong-language page rank in your reports?

We audit hreflang, codes, and canonicals in one pass and hand you the fixes — book a technical SEO audit with ZenWeb →


7. What Hreflang Costs and Returns in Malaysia

Quick Answer: Hreflang itself is cheap to add — the real cost is doing it correctly at scale and keeping it in sync. For most Malaysian SMEs it’s a one-off setup plus light upkeep, not a monthly line item.

The tags cost nothing; the work is mapping versions, templating the tags, and testing. Effort scales with how many languages and pages you run and how dynamic the site is.

Hreflang Setup Scope and Cost in Malaysia (Illustrative)
Illustrative hreflang setup scope, typical effort, and indicative one-off cost in Ringgit for small, mid-sized, and large Malaysian sites.
Site sizeTypical approachIndicative one-off cost
Small (2 languages, under 50 pages)Manual head tags on each pageRM 800–1,500
Mid (2–3 languages, 50–500 pages)Sitemap method or CMS templateRM 1,500–4,000
Large / e-commerce (dynamic)Automated generation plus monitoringRM 4,000+

Illustrative scoping ranges, ZenWeb, Malaysia 2026. Actual cost depends on CMS and page volume.

The return is simpler to picture than to measure: qualified visitors stop landing on the wrong-language page and bouncing. On a bilingual site, that recovered traffic is often already arriving — the tags just stop you losing it. It’s one of the highest-impact fixes inside a broader international SEO plan.

Key takeaway: Budget hreflang as a one-off technical setup, not a recurring cost. The payoff is keeping bilingual traffic you’re already earning.

8. How to Tell If Your Hreflang Is Working

Quick Answer: You’ll know hreflang is working when the right-language page shows for the right searcher, wrong-version impressions fall, and Search Console reports no hreflang errors. Always check the URL Google actually serves, not just the tag you wrote.

Start in Google Search Console, where these problems surface in the coverage and enhancement reports. Then watch the live results:

Give it time. Google has to recrawl every version before serving changes, so expect movement over weeks, not hours.

Key takeaway: Judge hreflang by what Google serves, not by what you tagged. The right version showing for the right searcher — on mobile included — is the only proof that counts.

9. Conclusion: Route Every Searcher to the Right Version

Hreflang is a small tag with an outsized job: it makes sure your English, Bahasa Malaysia, and Chinese audiences each land on the version written for them. It won’t rank a weak page or translate your content — but get the codes and reciprocity right, and you stop leaking qualified traffic to the wrong page. Map your versions, pick one method, keep the tags reciprocal, add an x-default, and check what Google actually serves.

If your bilingual site is showing the wrong version in search, that’s a fixable technical problem, and it’s exactly the kind of work ZenWeb handles as part of its SEO service.


10. Frequently Asked Questions

1. Does hreflang improve my Google rankings?

No. Hreflang is a serving and targeting signal, not a ranking factor. It decides which language or regional version Google shows a searcher — it doesn’t push any version higher in the results. Ranking still comes from your content, links, and technical health.

2. What is the hreflang code for Bahasa Malaysia?

Use ms for Bahasa Malaysia. If you specifically want to target Malaysia, use ms-my. For a Malaysia-only site, the language-only ms is usually cleaner and less error-prone than adding the region.

3. Do I really need an x-default tag?

It’s strongly recommended. The x-default value tells Google which page to serve users whose language or region doesn’t match any of your versions. Without it, Google has to guess a fallback, which is often the wrong one.

4. Can I use hreflang and canonical tags together?

Yes, and you should — but carefully. Each language version must canonicalise to itself, not to one shared URL. A canonical that points every version at the English page cancels the tag and is one of the most common faults we find.

5. Where should I put hreflang — head, sitemap, or HTTP header?

Any one of the three. Google treats them as equivalent, so choose the method your site can maintain without breaking reciprocity. Just don’t use more than one method for the same set of URLs.

Serving the wrong language version to your visitors?

Book a free 30-minute strategy session. We’ll check your hreflang, codes, and canonicals, show you where the wrong version is showing, and map the fixes that recover your bilingual traffic.

Get your free hreflang review →

Table of Contents

Table of Contents

See Also

TikTok Ads Malaysia: What Actually Works for SMEs 2026

TikTok Ads Malaysia: What Actually Works for SMEs 2026

Google Shopping Ads Malaysia: Sell Products in Search

Google Shopping Ads Malaysia: Sell Products in Search

Content Refresh: How Updating Old Posts Lifts Rankings

Content Refresh: How Updating Old Posts Lifts Rankings

Get A Free Proposal

Complete the form and our team will contact you to discuss your goals. Let’s grow your business.

Meowketing Specialist

Online

Today

Meow! 👋

We are Official Google Partner,
Ask us anything about Marketing!