By Hridoy Ahmed | Last updated: October 2026 | 8 min read
Short answer: Hreflang is a tag that tells Google which language or country version of a page to show to which user. Use it when you have the same content in more than one language or for more than one region. Every version must link to all the others and to itself, and each link must be returned. Google treats hreflang as a hint, not a command.
In this guide
- What hreflang is
- Do you need it?
- How to add hreflang
- The rules that matter
- Hreflang in WordPress
- Common mistakes
- FAQ
What hreflang is
If you have the same page in English and in Bangla, or one page for the US and another for the UK, hreflang tells Google they are alternate versions of each other. Google can then show the right version to the right user, and it helps avoid your pages being treated as duplicates of each other. This is part of international SEO.
Do you need it?
You need hreflang if:
- You publish the same content in more than one language
- You publish similar pages for different countries, for example US and UK pricing
You do not need it if your site is only in one language for one audience. Hreflang is not a ranking boost. Check my technical SEO checklist first and add this only if your site truly has several versions.
How to add hreflang
Google supports three ways. Pick one and use it everywhere:
- HTML tags in the head of each page. Example for an English and a Bangla page:
<link rel="alternate" hreflang="en" href="https://example.com/page/" /> <link rel="alternate" hreflang="bn" href="https://example.com/bn/page/" /> <link rel="alternate" hreflang="x-default" href="https://example.com/page/" /> - HTTP headers. Useful for non-HTML files such as PDFs.
- XML sitemap. List the alternate versions in the sitemap. This can be easier for large sites.
The rules that matter
- Use the right codes. Language uses ISO 639-1, such as
enorbn. A region is optional and uses ISO 3166-1 Alpha 2, such asen-GBoren-US. - Return links. If page A points to page B, page B must point back to page A.
- Include the page itself. Each version should list itself too.
- Use full URLs. Use the complete address, including https://.
- Add x-default for a fallback. It tells Google which page to show when no language matches.
- Keep canonicals consistent. Each version should usually have a canonical tag that points to itself.
- Do not rely on automatic redirects by location. Google may not see all versions if users are redirected away.
Hreflang in WordPress
WordPress does not add hreflang by itself. Multilingual plugins such as Polylang, WPML or TranslatePress can generate it for translated pages. Check the plugin’s documentation to confirm how it outputs hreflang, then test a few pages. Use one plugin only so the tags do not duplicate.
To check your pages after setup, open a page’s source and search for hreflang, or use a crawler to check for missing return links. If you want an expert to set it up, see my technical SEO service.
Common mistakes
- Missing return links between versions
- Using a wrong code, such as
en-UKinstead ofen-GB - Pointing hreflang to a page that redirects or returns an error
- Using hreflang for pages that are not true alternates
- Machine-translating thin pages and expecting them to rank
- Using several systems at once, such as plugin tags and sitemap tags that disagree
FAQ
What is hreflang?
It is an annotation that tells Google which language or regional version of a page to show to which users.
Does hreflang improve rankings?
No. It does not boost rankings. It helps Google show the correct version to the right audience.
What is x-default?
It is a value that marks the fallback page for users whose language or region does not match any version.
Do I need hreflang for a single-language site?
No. If your site has one language and one audience, you do not need it.
Can I use hreflang for English pages aimed at different countries?
Yes. Use language and region codes, such as en-US and en-GB, and make sure each page has real differences, such as currency or spelling.
Planning a multilingual site? I can review your setup so each version is found by the right people. See my SEO and technical SEO service.
About the author: Hridoy Ahmed is an SEO specialist and WordPress security expert based in Dhaka, Bangladesh. He has 8+ years of experience and works with clients worldwide.

