A ledger of AI tools and building sites for overseas traffic.

Home / Building & SEO / The Default Language on a Multilingual Site: Why It Shouldn't Carry a Language Prefix

The Default Language on a Multilingual Site: Why It Shouldn't Carry a Language Prefix

Default language at the root, others prefixed — the simplest hreflang setup. URL design, x-default, and the classic "can't switch language" bug.

Nov 8, 2026 3 min read naket.top Updated 2026-11-12
The Default Language on a Multilingual Site: Why It Shouldn't Carry a Language Prefix

A site targeting Europe and the US while keeping Chinese — how should the URLs be laid out? There are three common approaches, and only one satisfies both SEO and user experience.

Three URL structures

StructureExampleProblem
Directory prefix/en/, /de/The root path needs a redirect, which easily turns into 301 chains
Subdomainen.site.comAuthority gets split, domain management gets more complicated
Parameter?lang=enOne path maps to multiple pieces of content, canonical is hard to handle

The structure I chose

The default language sits at the root path, other languages get a directory prefix:

/                   ← default language (the browser negotiates which version gets rendered)
/en/   /de/   /fr/  ← other languages
/pve/gigabit/       ← article in the default language
/en/pve/gigabit/    ← the same article in English

The key point: the canonical URL of the default language never carries a prefix. This constraint keeps canonicals clean, keeps the hreflang group self-consistent, and avoids "the same piece of content having two addresses".

How to write the hreflang group

Every page outputs the full set of alternates, including itself:

<link rel="alternate" hreflang="zh" href="https://site.com/pve/gigabit/">
<link rel="alternate" hreflang="en" href="https://site.com/en/pve/gigabit/">
<link rel="alternate" hreflang="de" href="https://site.com/de/pve/gigabit/">
<link rel="alternate" hreflang="x-default" href="https://site.com/pve/gigabit/">

x-default points to the default-language version, for users whose language didn't match anything. It doesn't take part in language selection; it only tells Google where the entry point of the whole group is.

Three hard rules:

  1. They must point to each other. If A declares B, B must also declare A, otherwise the entire group is ignored.
  2. They must be absolute URLs, with protocol and domain.
  3. Only list translations that actually exist. Don't write in languages that haven't been translated.

That "can't switch the language" bug

With a prefixless default language, the easiest trap to fall into is in redirects.

If the root path uses a 301 to jump to a language prefix (an early version redirected to /en/, say), and the response gets cached by the browser or a CDN, then after the user clicks the language switcher, the cached 301 bounces them straight back. The symptom is that no matter how they switch, it won't switch.

Two fixes, both required:

  • The language switch itself goes through 302 + Cache-Control: no-store, no caching.
  • Default-language rendering returns 200 directly, with no redirect of any kind. Browser negotiation only decides server-side which copy gets rendered; the URL stays unchanged.

Doing content negotiation correctly

Read Accept-Language, use it if it matches an existing language, fall back to the default language if it doesn't. Two things to note:

  • Only consult Accept-Language on the first visit; afterwards the user's explicit choice wins (write a cookie).
  • Don't force a language switch based on IP geolocation. Cross-border visitors (VPN, business trips) get switched to another language for no reason.

Checklist

  • [ ] The canonical of default-language pages points to the prefixless URL
  • [ ] Every page has the full alternates, and they point to each other
  • [ ] x-default points to the default language
  • [ ] The language switch uses 302 + no-store, not 301
  • [ ] Every language version is listed in the sitemap, with xhtml:link annotations
  • [ ] <html lang> matches the actual content language
hreflanginternationalizationSEOURL design

Further reading

Google's multilingual and regional versions documentation ↗ RFC 5646 language tags ↗