Skip to main content

Early access: we are opening to a small group of businesses and agencies first.

AI Marketing Master

Technical SEO and website health

hreflang basics for websites in more than one language

Updated 21 Oct 2026 · Written and checked by the AI Marketing Master team, Shivah Web Tech

Short answer

hreflang is an annotation that tells Google which language or regional version of a page to show each searcher. If you have the same page in English, Hindi and Punjabi, each version lists all versions, including itself, with codes such as en, hi and pa. Every version must link back to the others, and each should keep a canonical tag pointing to itself.

When you need it

You need hreflang when the same content exists in more than one language or for more than one country, at different addresses. For example /en/services/, /hi/services/ and /pa/services/. Without it, Google may show the English page to someone searching in Hindi, or treat country versions in the same language as duplicates.

You do not need it for a single-language site, or for a site with a translate button that changes text without changing the address.

The codes

  • Language codes are two letters from ISO 639-1: en for English, hi for Hindi, pa for Punjabi.
  • An optional region uses ISO 3166-1 codes: en-IN for English in India, en-GB for the United Kingdom, en-CA for Canada.
  • A region on its own is not allowed. "in" is not a valid hreflang value.
  • A common slip is en-UK. The correct code is en-GB.
  • x-default marks the page to show when no listed language fits, often a language chooser or your main English page.

A worked example

The English services page carries three alternate links in its head: hreflang="en" pointing to /en/services/, hreflang="hi" pointing to /hi/services/ and hreflang="pa" pointing to /pa/services/, plus hreflang="x-default" pointing to the English page. The Hindi and Punjabi pages carry exactly the same set. Every page names itself and every sibling.

Three ways to add it

  • Link tags in the page head: the most common for small sites. Many multilingual WordPress plugins add them for you.
  • HTTP headers: useful for PDFs and other files.
  • XML sitemap entries: handy for large sites with many languages, but harder to check by eye.

Mistakes that make Google ignore it

  • Missing return links: if the Hindi page lists the English one but not the other way round, the pair is ignored.
  • Each language version's canonical pointing to the English page. That tells Google the translations are duplicates.
  • Linking to pages that redirect, return 404 or are noindex.
  • Pointing hreflang at pages that are not real translations of each other.
  • Machine-translated pages left unchecked. hreflang helps the right page show; it does not make a poor translation useful.

How AI Marketing Master fits in

The app writes content in English, Hindi and Punjabi, with quality checks and approval, which helps you keep proper translated versions of key pages. The website audit checks canonical tags, which matters because a wrong canonical on a translated page is the most damaging hreflang mistake. The audit does not check hreflang annotations themselves, so verify those in your multilingual plugin and with Search Console.

What it does not do

  • The website audit does not check hreflang tags. It checks canonical tags, which must be set correctly for hreflang to work.
  • AI Marketing Master does not add hreflang to your website; your CMS or a multilingual plugin does that.

Questions people ask

Should I also set the lang attribute?

Yes. Set the lang attribute on each page's html tag, for example lang="hi" on Hindi pages. It helps browsers, screen readers and search engines, and supports what hreflang says.

Can I use hreflang for Hindi written in English letters?

hreflang describes language, not script. Hinglish pages are usually treated as Hindi or English depending on the main language. If in doubt, keep one clear language per page.

Is hreflang a ranking factor?

No. It does not push a page higher. It helps Google swap in the right language version of a page that already ranks.

Check your canonical tags

We only describe what the product really does today. Results depend on your business, your market and many things no tool controls.

Start with a free look at your marketing

Tell us your website, or start with social media if you do not have one yet. It takes a few minutes and you can stop any time.