Skip to main content
Web & SEO

Multilingual Website SEO Done Right: hreflang, URL Structure and a Translation Workflow

Set up a multilingual website for search: URL structure, hreflang and canonical rules from Google's docs, common mistakes and a translation workflow.

By Jayson Hao8 min read
Tactile paper and metal editorial artwork for Multilingual Website SEO Done Right: hreflang, URL Structure and a Translation Workflow
Editorial field noteITL / № 35

Key takeaways

  • Google says it does not use hreflang, the HTML lang attribute or the URL to detect a page's language; it reads the visible content.
  • hreflang annotations are ignored unless both pages point to each other, and every version must list itself as well as all the others.
  • A canonical tag should point to a page in the same language; pointing every translation at the English page asks Google to drop the translations.
  • In the 2025 Web Almanac crawl, 20.3% of desktop pages and 19.7% of mobile pages used hreflang, roughly double the previous year.

How Google decides which language version to show

Two separate questions decide whether a multilingual site works in search. The first is what language a page is in. Google answers that itself: its multi-regional guidance says it uses the visible content of the page and does not use code-level signals such as lang attributes or the URL. A page whose main text is still in English is an English page, whatever its address or markup says.

The second question is which of several equivalent pages to show a given searcher. That is what hreflang is for. Google's documentation on localized versions describes hreflang as a way to tell Google that pages are localized variations of the same content, so that Search can point users to the right version for their language or region. Without it Google may still find the alternates, but Google recommends declaring them explicitly.

Adoption is growing quickly. The SEO chapter of the 2025 Web Almanac, which analyzes the HTTP Archive crawl, found hreflang on 20.3% of desktop pages and 19.7% of mobile pages, which the authors describe as roughly double the previous year's rate. More sites are declaring language versions, which also means more sites are getting the details wrong.

Which URL structure is best for a multilingual website?

Every language version needs its own URL. Google's guidance compares four options and recommends against only one of them, URL parameters. The right choice depends less on SEO than on how many markets you serve and who will maintain the site.

  • Subdirectories (example.com/fr/, example.com/ja/): easy to set up and low maintenance on a single host. This is what we use on this site and what we recommend for most companies serving two to five languages.
  • Subdomains (fr.example.com): easy to set up and allow different server locations, but users may not recognize the target market from the URL alone.
  • Country domains (example.fr, example.jp): the clearest geotargeting, but each domain targets a single country, costs more and may have strict registration requirements. Worth it when each market runs as its own business.
  • URL parameters (example.com?lang=fr): Google marks this option as not recommended.

Language switching: avoid automatic redirects and IP detection

Many sites try to be helpful by sending visitors to a language based on their IP address or browser. Google advises against it: avoid automatically redirecting users from one language version to another, and do not use IP analysis to adapt content, because IP location analysis is difficult and generally not reliable. A bilingual Montreal resident, a Japanese traveller in Toronto and a crawler all break those assumptions.

The pattern that works is simple: every language version is reachable at a stable URL, each page links to its counterpart in the other languages, and a home page or language selector can carry the x-default annotation for visitors whose language you do not serve. If you do suggest a language, use a dismissible banner rather than a redirect.

hreflang rules that actually matter

Google accepts hreflang in HTML link tags, HTTP headers or an XML sitemap, and says the three are equivalent. Pick one. Using all three gives no extra benefit and makes the set harder to keep consistent. HTML tags suit most sites; the sitemap suits very large sites; the HTTP header is for files such as PDFs. Whichever you choose, these rules from Google's documentation apply.

  • Every version lists itself and all other versions, so the set of annotations is identical on every page in the group.
  • Links must be reciprocal. If two pages do not both point to each other, Google ignores the tags.
  • URLs must be fully qualified, including https://. Relative paths such as /ja/page are not valid.
  • Codes are an ISO 639-1 language, optionally followed by an ISO 3166-1 Alpha-2 region: ja, fr, fr-CA, en-GB. A region alone is not valid, and codes outside those standards, such as es-419, are not supported.
  • Add x-default for visitors whose language settings match none of your versions. Google says it was designed for language selector pages and works best there.

hreflang and canonical tags: how they work together

One of the most damaging mistakes on bilingual sites is a canonical tag on the French or Japanese page that points to the English page. A canonical tells Google which URL to index; pointing translations at English asks Google to treat them as duplicates and keep only the English URL. Google's canonicalization guide says that when you use hreflang, you should specify a canonical page in the same language, or the best possible substitute language if none exists.

In practice each language version carries a self-referencing canonical plus the full hreflang set. Two related details from the same guide: a canonical link that itself carries an hreflang attribute is ignored for canonicalization, and Google prefers URLs that are part of a reciprocal hreflang cluster when choosing canonicals. Google also notes that localized pages are only considered duplicates if the main content remains untranslated.

Common hreflang mistakes: a pre-launch checklist

Most of these come straight from the common mistakes Google lists; the rest are what we check whenever we build or audit a bilingual site. Run the list before launch and after any change to routing, the CMS or the translation plugin.

  • Japanese is ja, not jp. jp is a country code, and Google does not derive the language from a country code. Likewise, se is Northern Sami rather than Swedish (sv), and dk is not a language code at all (Danish is da).
  • The United Kingdom is en-GB. Reserved codes such as UK, EU and UN have no effect in Google Search.
  • Every hreflang URL returns 200 and is indexable. Annotations that point to redirects, 404s or noindex pages waste the cluster.
  • Each page's canonical points to itself, not to the default language.
  • The tags sit inside a well-formed head in the rendered HTML. Google suggests running the rendered page through an HTML validator if in doubt, because an invalid element earlier in the head can close it early.
  • Untranslated pages are not given hreflang alternates that are really the same English text with a translated menu.

A translation workflow that holds up in search

Google recommends a single language for content and navigation on each page and warns against side-by-side translations. It also cautions that translating only the template, such as menus and footer, while the main content stays in one language creates a poor experience. Its spam policies list pages produced by scraping content and applying automated transformations such as translating as an example of scaled content abuse. Machine translation is a useful first draft; publishing it unreviewed across hundreds of pages is the risk.

The workflow we use for bilingual English–Japanese sites, including this one, looks like this:

  • Research keywords separately in each language. Check what searchers actually type in Japanese or French instead of translating your English keyword list word for word.
  • Store every language in the same content record (or linked records) so that a page cannot be published in one language without its counterpart being known to the hreflang generator.
  • Translate titles, meta descriptions, image alt text, structured data and URL slugs where it makes sense, not only body copy.
  • Use a glossary for product names and regulated terms, and have a fluent reviewer approve each page before it goes live.
  • Generate hreflang, canonical and sitemap entries from the same data in code, never by hand per page.

Keep the lang attribute for accessibility, and test what ships

Google does not use the HTML lang attribute, but people do. WCAG 2.2 success criterion 3.1.1, Language of Page, is Level A: the default language of each page must be programmatically determinable so that screen readers load the right pronunciation rules. Criterion 3.1.2, Language of Parts, is Level AA and covers passages in another language, such as a Japanese company name inside an English page. Set lang="ja" on Japanese pages and lang="fr-CA" on Canadian French pages even though it does nothing for ranking.

After launch, check the rendered HTML of a sample of pages in each language with the URL Inspection tool in Search Console, crawl the site with an hreflang-aware crawler to catch missing return links, and compare impressions by country and language in the performance report. Problems usually show up as the wrong language version ranking in a market, which is easier to fix in week one than after a year of mixed signals.

About the author

Jayson Hao

Founder of Innovation Trigger Lab and a University of Toronto Computer Science graduate with an AI/ML focus. He designs and ships production RAG systems, AI chatbots, web platforms and mobile products.

View profile

Frequently asked questions

Does hreflang help a page rank higher?

Not directly. hreflang tells Google which equivalent version to show a searcher based on language or region. It helps the right page appear, not a page rank above competitors.

Should I use en or en-CA in hreflang?

Use the language code alone (en, fr, ja) unless the content actually differs by region, for example prices or shipping rules. If you have several regional English pages, Google suggests also providing a generic en page as a catch-all.

Is machine translation bad for SEO?

The risk is unreviewed translation at scale. Google's spam policies treat scraped content run through automated transformations such as translating as scaled content abuse. Use machine translation as a draft and have a fluent person review each page.

Do I need hreflang if I also set the lang attribute?

Yes, you need both. Google says it does not use the lang attribute, so hreflang is how you tell Search about language versions, while lang is what screen readers and browsers rely on.

Sources and further reading

  1. 1.
    Tell Google about localized versions of your pageGoogle Search Central, September 21, 2026
  2. 2.
    Managing multi-regional and multilingual sitesGoogle Search Central, December 10, 2025
  3. 3.
  4. 4.
    Spam policies for Google web searchGoogle Search Central, August 28, 2026
  5. 5.
    Web Almanac 2025: SEOHTTP Archive, January 15, 2026
  6. 6.