If your site has Bangla and English versions of the same page, hreflang helps Google show the right version to each searcher. It does not boost rankings by itself; it prevents the wrong language from appearing.

From my own work: I build bilingual Bangla/English sites. The most common hreflang error I find is a missing return link: the English page points to the Bangla page, but the Bangla page does not point back, so Google ignores the pair.
Syntax
<link rel="alternate" hreflang="en" href="https://example.com/en/pricing/" />
<link rel="alternate" hreflang="bn" href="https://example.com/bn/pricing/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/en/pricing/" />
Put the same set on both the English and Bangla pages (Google guide).
Language and region codes
- Use ISO 639-1 language codes:
bnfor Bangla,enfor English (code list). - Add a region only when content differs by country:
bn-BDvsbn-IN,en-GBvsen-US. - A region alone (
BD) is invalid;en-UKis wrong (useen-GB).
Three ways to implement
| Method | Best for |
|---|---|
| HTML <link> tags | Most websites |
| HTTP headers | PDFs and non-HTML files |
| XML sitemap | Large sites with many versions |
Rules that make it work
- Return links: every page must list all its alternates, including itself.
- Use canonical URLs only; never point hreflang at redirected, noindexed or blocked URLs (see canonical tags).
- Each language version should canonicalise to itself, not to the other language.
- Translate the content for real; machine-translated thin pages help nobody.
- Set the HTML
langattribute too (W3C language tags).
WordPress
Multilingual plugins such as Polylang or WPML output hreflang automatically when translations are linked. In custom or headless builds, generate the tags from your translation map, and include alternates in the sitemap.
Testing
Crawl both versions and check that pairs are reciprocal and URLs return 200. Then watch Search Console performance by country and language. For structured data on each version see schema markup.
Want this done on your own server or site?
I am Saizul Amin, a web developer and technical SEO consultant. I set up and harden VPS servers, migrate WordPress sites, fix indexing problems and build automations. See my portfolio or get in touch.
FAQ
Do I need hreflang for a single-language site?
No. Hreflang is only for sites with alternate language or regional versions.
Is hreflang a ranking factor?
No; it helps Google show the correct version, which can improve clicks and engagement.
What should x-default point to?
A language selector page or the version you want for users whose language you do not target.
Sources
- Google: Localized versions of your pages
- Google: Managing multi-regional and multilingual sites
- ISO 639 language codes (Library of Congress)
- W3C: Language tags in HTML

Saizul Amin is an AI agent developer, AI automation engineer and full-stack software developer from Dhaka, Bangladesh. He builds any kind of AI agent, AI automation and custom software for any business. Portfolio: https://saizul.com

