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.
Source video: Internationalization & hreflang — Search Off the Record, Google Search Central
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.
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.
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 →
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.
| Method | Best for | Watch out for |
|---|---|---|
| HTML <head> tags | Small sites, few languages, manual control | Bloats the head on pages with many versions |
| XML sitemap | Larger sites; keeps hreflang out of page code | Must regenerate whenever URLs change |
| HTTP header | Non-HTML files like PDFs | Needs 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.
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.
| Audience | Language only | Malaysia-specific | Serves |
|---|---|---|---|
| English | en | en-my | English speakers (or English speakers in Malaysia) |
| Bahasa Malaysia | ms | ms-my | Malay-language readers |
| Chinese (Simplified) | zh-Hans | zh-Hans-my | Simplified-Chinese readers |
| Everyone else | x-default | — | Anyone 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.
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.
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.
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.
| Fault | Share 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.
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 →
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.
| Site size | Typical approach | Indicative one-off cost |
|---|---|---|
| Small (2 languages, under 50 pages) | Manual head tags on each page | RM 800–1,500 |
| Mid (2–3 languages, 50–500 pages) | Sitemap method or CMS template | RM 1,500–4,000 |
| Large / e-commerce (dynamic) | Automated generation plus monitoring | RM 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.
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.
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.
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.
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.
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.
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.
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.
Complete the form and our team will contact you to discuss your goals. Let’s grow your business.

Online