Skip to content
SEO and digital growth

International SEO and Hreflang for Multilingual Websites

Selling to more than one country or language? When hreflang matters, which URL structure to pick, how the tags work, the mistakes Google ignores, and what WordPress plugins handle for you.

Harsh PrajapatiFull stack developer
Published
Reading time
8 min

International SEO and Hreflang for Multilingual Websites

Hreflang is a tag that tells Google which language or country each version of a page is meant for, so a visitor in Germany sees your German page and a visitor in the UK sees your UK English page. You need it when you have the same content in more than one language, or in one language aimed at different countries (for example US and UK English with different prices). If your site has only one language for one market, you do not need hreflang at all.

This guide is for business owners planning to sell abroad or adding a second language to their site. It covers the structural decisions that are expensive to change later, how hreflang works according to Google's own documentation, and the mistakes that make Google ignore it. For Indian regional languages on WordPress, my guide to a multilingual WordPress website in India covers the plugin and translation side.

#When you need hreflang, and when you do not

Hreflang solves one problem: helping Google show the right version of a page when several versions exist. It does not translate anything, rank a page higher, or tell Google what language a page is written in.

That last point surprises people. Google's documentation says Google does not use hreflang or the HTML lang attribute to detect a page's language; it works that out from the visible content. Hreflang only signals which audience each version targets.

You need hreflang when:

  • Your site has the same pages in two or more languages, such as English and Spanish.
  • You have one language with country versions that differ, such as UK and Australian pages with different prices, currency or delivery terms.
  • Your pages in one language are being shown to searchers in a country where another version would suit them better.

You can usually skip it when:

  • The site serves one language and one market.
  • Your "international" pages are entirely different content, not versions of each other.
  • You only translate a handful of pages; you can still use hreflang on those pages alone.

#Choosing a URL structure

The URL structure is the decision that matters most, because changing it later means redirects, re-indexing and a temporary dip in traffic. Google's guidance on multi-regional sites describes four options.

StructureExampleStrengthsWeaknessesSuits
Country domain (ccTLD)example.deClearest country signal; easy to run as separate sitesCosts more; each domain may have its own rules; targets one country onlyLarge brands with local teams in each country
Subdomainde.example.comSimple to set up; can be hosted separatelyURL alone may not show whether de is a language or countrySites run on separate systems per region
Subfolderexample.com/de/Simple, low maintenance, one host; builds on the main domainURL alone may not show the target; one server locationMost small and mid-sized businesses
URL parameterexample.com?loc=deNone listed by GoogleNot recommended by GoogleAvoid

For most businesses expanding into a few markets, subfolders are the practical choice: one site, one hosting plan, one set of plugins, and every new language benefits from the authority the main domain has already built. Country domains make sense when each country has its own legal entity, team, pricing and content.

Whatever you choose, keep each version on its own URL. Google advises against pages that change their content based on the visitor's location or browser language, because Googlebot usually crawls from the USA and may never see the other versions. Its documentation is blunt: "Don't use IP analysis to adapt your content."

#How hreflang works

Each page lists every version of itself, including itself, with a language code and an optional region code. Google says the three ways of doing this are equivalent:

  1. HTML tags in the <head> of each page. The most common method.
  2. HTTP headers, useful for files such as PDFs that have no HTML head.
  3. An XML sitemap, which keeps the markup out of the pages and suits large sites.

Use one method, not several. Using more than one adds maintenance work without any benefit.

Here is what HTML hreflang looks like on the English page of a site with English, German and Swiss German versions:

HTML
<link rel="alternate" hreflang="en" href="https://example.com/page/" />
<link rel="alternate" hreflang="de" href="https://example.com/de/page/" />
<link rel="alternate" hreflang="de-CH" href="https://example.com/ch/page/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/page/" />

The German and Swiss pages carry exactly the same four lines. The rules behind it, from Google's documentation:

  • Return links are required. If page A points to page B, page B must point back to A. In Google's words: "If two pages don't both point to each other, the tags will be ignored."
  • Codes follow standards. Language codes come from ISO 639-1 (such as en, de, hi), and optional region codes from ISO 3166-1 Alpha 2 (such as GB, IN, CH). The language always comes first. A region on its own is not valid.
  • URLs must be full addresses, including https://.
  • x-default names the page to show when no version matches the visitor's language or region. It is often the main English page or a language picker.
  1. Decide markets and languages
  2. Choose URL structure
  3. Publish each version on its own URL
  4. Add hreflang with return links and x-default
  5. Check in Search Console
  6. Monitor and keep in sync

#Common hreflang mistakes

Most hreflang problems are not complicated; they are small errors repeated across hundreds of pages. These are the ones that show up most often in audits.

  • Missing return links. The English page lists the French page, but the French page does not list the English one. Google ignores the pair.
  • Wrong codes. en-UK is a classic: the ISO code for the United Kingdom is GB. Google's documentation also says EU, UN and UK in hreflang have no effect in Google Search.
  • Region without language. Google's documentation says a country code on its own is not valid, so hreflang="in" does not mean India. For English in India, use en-IN.
  • Pointing at redirected or broken pages. Hreflang should point at the final, indexable URL that returns a normal page, not at a redirect or a page blocked from indexing.
  • Canonical tags that fight hreflang. Each language version should usually be its own canonical. If the German page's canonical points to the English page, you are telling Google the German page is a duplicate.
  • Automatic redirects by location. Sending every visitor from India to /in/ based on IP stops Google, and travellers, reaching the other versions. Use a visible language or country switcher instead.
  • Machine translation published without review. Thin, unreviewed translations rarely rank and can hurt trust. Google's guidance on AI-generated content warns that generating many pages without adding value may break its spam policies.

A technical SEO audit on an international site checks these at scale, because a crawler can compare every hreflang set and report the broken ones.

#Hreflang on WordPress: what the plugins do for you

On WordPress, the multilingual plugin usually writes the hreflang tags for you. The work that remains is choosing settings well and checking the output.

WPML. WPML's documentation says it "automatically inserts hreflang tags to your pages, and updates them as you make changes to your website." Its page does not say how x-default is set, so check the page source after setup.

Polylang. Polylang's own guide says it adds hreflang automatically, but generates an x-default only for the homepage, and only when the homepage redirects to a language. For x-default on other pages you need a small code snippet using its documented filter.

TranslatePress. TranslatePress's settings let you show the country locale (such as en-GB), the region-independent locale (en), or both, with both as the recommended default. A separate setting enables x-default for a chosen language.

Whichever plugin you use, check three things after setup:

  1. View the source of a translated page and confirm one tag per version, plus x-default where you want one.
  2. Confirm the codes are valid, especially any custom regions.
  3. Check that untranslated pages are not listed as alternates of translated ones.

#Beyond hreflang: what makes international SEO work

Hreflang only sorts versions that already deserve to rank. The pages themselves still have to suit the market:

  • Real local content. Local currency, delivery terms, phone numbers, units and examples. A US page and a UK page that differ only in spelling rarely need separate versions.
  • Keyword research per market. People in different countries search with different words. Translate the intent, not just the phrase.
  • Local trust signals. Local reviews, addresses where you have them, and payment methods people in that country expect.
  • Internal links and a switcher. Link each version to the others with a visible language or country switcher so people and crawlers can find them.
  • Search Console checks. Watch which pages Google indexes in each market and fix gaps early.

If you are planning to enter new markets, the structure and hreflang should be designed before translation starts. My technical SEO service covers the setup and checks, and the wider SEO services page covers keyword research and content for each market.

Frequently asked questions

What is hreflang used for?

Hreflang tells Google which language or regional version of a page to show each searcher, when the same content exists in several versions. It does not translate pages or improve rankings by itself; it helps the right version appear for the right audience.

Do I need hreflang for a single-language website?

No, a site with one language for one market does not need hreflang. It becomes useful only when you publish the same pages in more than one language, or in one language for several countries with different content such as prices or delivery terms.

What does x-default mean in hreflang?

x-default is the fallback page Google shows when none of your language or region versions matches the visitor. Many sites point it at their main English page or at a page where visitors choose their language or country.

Is a subfolder or a subdomain better for international SEO?

Google accepts both, and neither is a ranking shortcut. Subfolders such as example.com/de/ are simpler and cheaper to run for most businesses, while subdomains or country domains suit organisations that run each market as a separate site with its own team.

Why is Google ignoring my hreflang tags?

The most common cause is missing return links, where one page lists another but the other does not list it back. Invalid codes such as en-UK, links to redirected or non-indexable pages, and conflicting canonical tags are the next most common causes.

Sources

The facts in this article were checked against these pages, last reviewed 12 November 2026.

  1. Tell Google about localized versions of your page, Google Search Centraldevelopers.google.com/search/docs/specialty/international/localized-versions
  2. Managing multi-regional and multilingual sites, Google Search Centraldevelopers.google.com/search/docs/specialty/international/managing-multi-regional-sites
  3. Google Search's guidance on using generative AI content, Google Search Centraldevelopers.google.com/search/docs/fundamentals/using-gen-ai-content
  4. How to add hreflang in a WordPress website, WPMLwpml.org/documentation/support/adding-hreflang-wordpress/
  5. Hreflang tag attributes and Polylang, Polylangpolylang.pro/hreflang-tag-attributes-and-polylang-everything-you-need-to-know/
  6. Advanced settings, TranslatePress Docstranslatepress.com/docs/settings/advanced-settings/
Harsh Prajapati, the author

Written by

Harsh Prajapati

Freelance full stack developer, founder of Worklancio

Web developer since 2018, freelancing since 2022. Builds WordPress sites and plugins, web apps and CRMs from Ahmedabad.

You may also like