SEO & AEO

Multilingual and Multi-Region Websites: URLs and hreflang

How to structure a site for several languages or countries: ccTLDs, subdomains, subdirectories, hreflang rules, return links, x-default and redirect traps.

By Biply Team · · 5 min read

A business that sells in several countries or languages has to decide how to arrange the pages, and the decision is hard to reverse. The structure affects maintenance, geotargeting and what search engines can understand. The good news is that Google’s guidance is concrete.

The short answer: give each language or regional version its own URL, choose a structure you can maintain, link the versions to each other with hreflang that lists every version including itself, avoid automatic redirects by language or location and keep each page in one language. Add versions only when you can maintain them.

A disclosure: Biply’s own website is English-only, so this guide draws on Google’s documentation, not on our experience running a multilingual site. For clients we plan structure before building.

What Google documents

URL structures (from Google’s multi-regional guidance):

Structure Pros stated Cons stated
Country domain (example.de) Clear geotargeting, easy separation Expensive, more infrastructure, one country only
Subdomain (de.example.com) Easy to set up, flexible server location Users may not recognise the geotargeting
Subdirectory (example.com/de/) Easy to set up, low maintenance Single server location, separation harder
URL parameters (site.com?loc=de) None listed Marked not recommended

Language handling:

  • Use different URLs for each language version, not cookies or browser settings.
  • Use a single language for content and navigation on each page, and avoid side-by-side translations.
  • Translating only the boilerplate while leaving most content in one language can create a bad user experience.
  • Avoid automatically redirecting by assumed language, and do not use IP analysis to adapt content, because Google might not find and crawl all variations.
  • Consider linking to other language versions.
  • Google does not use code-level language information such as the lang attribute or the URL to detect language.

hreflang (from Google’s localized versions guidance):

  • Three equivalent methods: HTML link elements, HTTP headers or an XML sitemap; using more than one gives no benefit.
  • Each version must list itself and all others; if two pages do not both point to each other, the tags are ignored.
  • URLs must be fully qualified, and codes must be ISO 639-1 languages and ISO 3166-1 Alpha 2 regions; a country code alone is not valid.
  • x-default is the fallback when no other language or region matches.
  • Missing return links and invalid codes are common mistakes.

A planning checklist

  1. Decide which markets justify a version. Each one is an ongoing commitment, not a launch task.
  2. Choose the URL structure from the table, based on budget and maintenance.
  3. Translate whole pages, including navigation, forms and calls to action, not just headings.
  4. Add hreflang for every version, with return links, and an x-default if you have a selector; see sitemaps and robots.txt for the sitemap method.
  5. Give each version its own canonical, pointing to itself; see canonical tags.
  6. Let visitors choose. A visible language switcher beats automatic redirects.
  7. Check each version in Search Console, and track by market; see Search Console setup.
  8. Plan the content workflow: who updates all versions when something changes?

A hypothetical example

A software consultancy based on an English site wants Spanish pages for a new market. It chooses subdirectories, /es/, because the team has one platform and no budget for separate domains. Every English page that has a Spanish equivalent lists both with hreflang and each Spanish page lists both back; pages without a translation have none. The language switcher links to the equivalent page, not the home page. It resists a redirect based on the browser’s language, so visitors and crawlers see the same pages.

Common mistakes

  • hreflang on one side only, so it is ignored.
  • Using uk or eu as a region code.
  • Redirecting users by IP.
  • Machine-translated boilerplate around English content.
  • Launching a language and then not updating it.

Questions before you commit to a market

Adding a language is a content decision first. Ask how many pages will be translated at launch and who maintains them, what the sales process is in that market and whether someone can answer enquiries in that language, whether prices, legal pages and contact details differ, and how you will measure whether the version earns its keep. A half-translated site, where navigation is in one language and content in another, is the experience Google’s guidance warns against. If the answers are vague, start with one market and a small set of pages, and expand when results justify it.

How to check your hreflang

Pick one page with versions in two languages. Open both and confirm each lists itself and the other, with fully qualified URLs and valid codes. Check that each version’s canonical points to itself, not to the original-language page. Look in Search Console for errors after Google has recrawled, which can take time. Repeat for one page of each template, since errors usually come from the template, not the page.

Next steps

If you are planning more than one market and want the structure checked before you build, see our web design and development service and contact us. For URL rules in general, read URL structure for business websites.

Sources

FAQ

Frequently asked questions

Which URL structure should a multilingual site use?

Google's documentation lists country-specific domains, subdomains, subdirectories and URL parameters, with parameters marked as not recommended. Subdirectories are easy to set up and low maintenance but make separation harder; country domains give clear geotargeting but are costly and target one country.

What does hreflang do?

It tells Google about localized versions of a page. Each version must list itself and all other versions, and if two pages do not point to each other, the tags are ignored.

What is x-default?

A reserved value used when no other language or region matches, for example pointing to a country selector page.

Can I redirect visitors automatically by language or IP?

Google advises avoiding automatic redirects based on what you think the user's language may be, and says not to use IP analysis to adapt content, because Google might not find and crawl all variations. Link between versions instead.

Does Google use the lang attribute to detect language?

No. Google says it does not use hreflang or the HTML lang attribute to detect the language of a page. Keep each page in a single language for content and navigation.

Keep reading

Cookie settings

Choose which cookies we can use. You can change this at any time from “Cookie settings” in the footer.

Strictly necessary

Always on

Needed for the site to work and to remember your cookie choice. They do not track you.

Help us measure visits, traffic sources (including AI assistants) and how pages are used: Google Analytics 4, Microsoft Clarity and Searchable Analytics. See the cookie policy for details.