A website in every language you sell in: translated URLs, hreflang and what breaks
Give every language its own address, and let each page list itself and its real translations with hreflang, in the page head or in the sitemap, with links going both ways. Translated slugs are fine, as long as you keep one map of them. What breaks is the in-between: pages that exist in one language only, translations still in draft, renamed slugs and a language switch that drops people on a home page. hreflang doesn't make a page rank. It tells Google which of your pages to show to which reader.
In the template that builds the case studies on this site there is a comment I wrote for myself: “Claiming an hreflang for a page that was never built would point Google at a 404.” The site is in English and Slovak. Most pages exist in both, some in one, and some articles get their second language weeks later. Two lines of code under that comment decide which of those Google is told about.
Putting a page into a second language is a translation job plus a routing table. What actually breaks multilingual sites is everything nobody plans for: the page that exists in English and not yet in German, the article still in draft, the slug someone renames a year after launch, the language switch that sends people to a home page. My site’s code has a comment next to almost every one of these, and that code is what most of this article is built on.
This is for companies that have a site in one language and are adding a second or a third for new markets. A Slovak contractor adding German for buyers in Austria and Germany, say, or a Czech agency adding English for the UK. If you have one language and one market, you can stop reading here.
One honest thing first: hreflang doesn’t make a page rank. It tells Google that two of your pages are the same content in different languages, so a German searcher is shown the German page instead of the English one. Whether either of them ranks depends on everything else on the page.
What Google actually asks for
Google’s page on localized versions (last updated 21 September 2026) is short, and stricter than most guides make it sound. These are the rules I build to:
| Rule | What it means in practice |
|---|---|
| One URL per language | No cookie or browser setting that swaps the language on the same address. Google recommends separate URLs. |
| Each version lists itself and all the others | A page in three languages carries three hreflang links, one of them to itself. |
| Links go both ways | If the German page points to the English one and the English page doesn’t point back, Google ignores the pair. |
| Full URLs | https://example.com/de/kontakt, not /de/kontakt. |
| Language first, region optional | de, en, en-GB. UK is not a valid code (Great Britain is GB), and be means Belarusian, not Belgium. |
x-default for everyone else |
The page for readers whose language you don’t have: usually your main language or a language picker. |
| One method is enough | HTML <link> tags, HTTP headers or the XML sitemap. Google treats them as equivalent and says using several brings no benefit. |
| Canonical in the same language | Every language version is its own canonical. Google’s canonical page says to pick one in the same language, never the “main” one. |
For UK and US readers: if your English pages are the same for both countries, use en and stop there. I would split into en-GB and en-US only when the pages really differ, with prices in pounds and dollars or different delivery terms. Two identical English pages with two region codes just give you twice the pages to keep in sync.
Two more things in Google’s documentation tend to surprise people. Google says it doesn’t use the lang attribute or the URL to decide what language a page is in. It reads the visible text. So a German page with an English menu and footer is a mixed page, and Google asks for one language per page, navigation included. And it asks you not to redirect visitors by IP address or browser language, because Googlebot mostly crawls from US addresses and doesn’t send an Accept-Language header. A site that switches language on its own may only ever show Google one version. Put a language switch on the page and let people choose.
Where it breaks: the page that exists in one language
Every rule above assumes that each page exists in every language. On real sites it doesn’t. On this site some articles get their Slovak version weeks later and some never do, and two service pages exist in one language only: SaaS development in English, migration from Shoptet (a Czech and Slovak e-commerce platform) in Slovak.
The trap is the default. The layout of this site assumes, unless a page says otherwise, that it has the same path in both languages:
// src/layouts/Base.astro
const paths = Astro.props.paths ?? { en: path, sk: path };
For most pages that’s true, and it saves repeating the same thing on every page. For a page that exists in one language only, it would print an hreflang to a Slovak address that was never built. Google would follow it to a 404, and the pair is worthless anyway, because a 404 can’t link back. So the case study template checks first:
// src/components/CaseStudy.astro
// Some projects are written in one language only. Claiming an hreflang for a page that was never
// built would point Google at a 404; the language switch then falls back to the other home page.
const paths = otherEntry ? { en: path, sk: path } : { [lang]: path };
Articles are harder, because they have a different slug in each language: /blog/upgrade-prestashop-1-7-to-8-9/ and /sk/blog/upgrade-prestashop-1-7-na-8-9/. Each article names its twin in a translation field. That wasn’t enough on its own. A translation can exist as a file and still be a draft, and drafts are not built for production:
// src/components/BlogPost.astro
// Pair the languages only once the translation is published; a draft would be a 404 in production.
const twin = d.translation ? await getEntry('blog', `${other}/${d.translation}`) : undefined;
if (twin && (import.meta.env.DEV || !twin.data.draft)) paths[other] = `/blog/${d.translation}/`;
What I like about this: when the Slovak version is published, the English article gets its hreflang on the same build without anyone touching the English file. Both pages are rebuilt and both point to each other from then on. The rule is simple enough to say out loud: an hreflang may only point at a page this build actually produced.
The language switch reads the same data. If the other version doesn’t exist, the SK button goes to the Slovak home page instead of a 404 (src/components/LangSwitch.astro). Someone who wants Slovak still ends up in Slovak, and nobody sees an error page.
Then the sitemap. Astro’s sitemap integration pairs pages that share a path, like /work/genau/ and /sk/work/genau/, on its own. Service pages have a different slug in each language (/web-development/ and /sk/tvorba-webu/), so astro.config.mjs carries a hand-written list of five pairs. That list repeats what src/data/services.ts already knows in its twin field. Two places holding the same fact will disagree one day. With five pairs I live with it; with a third language it’s the first thing I would replace.
The head and the sitemap also don’t say exactly the same thing. The head of a page carries an x-default, the sitemap entry for the same page doesn’t. Google treats the methods as equivalent, and I honestly don’t know whether it minds the difference. If I started again I’d pick one source and generate both from it.
Translated slugs, and the map you have to keep
There are a handful of ways to put languages into addresses. Google’s page on multi-regional sites (10 December 2025) lists their trade-offs. My short version:
| Approach | Example | Good for | What it costs |
|---|---|---|---|
| Language folder, same slug | /de/services |
Quick to build, one list of slugs | The German reader sees an English word |
| Language folder, translated slug | /de/dienstleistungen |
Readable addresses in results and shared links | A map per page, and every rename needs a redirect in each language |
| Subdomain | de.example.com |
Separate hosting or separate teams | More setup; readers can’t tell if de means language or country |
| Country domain | example.de |
A clear signal for one country | Cost, and each domain is a site of its own |
| URL parameter | ?lang=de |
Nothing, really | Google doesn’t recommend it |
Google says words in the reader’s language are fine in URLs. It doesn’t say they help a page rank, and I wouldn’t claim it. I translate slugs because people read addresses in search results and in links someone pasted into an e-mail, and /de/zertifikate tells a German buyer what they’re about to open.
Here is part of the slug map of Genau, a company site I built in Slovak, English and German:
| Slovak (default) | English | German |
|---|---|---|
/ |
/en |
/de |
/o-nas |
/en/about-us |
/de/uber-uns |
/historia |
/en/history |
/de/firmengeschichte |
/sluzby |
/en/services |
/de/dienstleistungen |
/zahranicni-partneri |
/en/partners |
/de/auslandische-partner |
/certifikaty |
/en/certificates |
/de/zertifikate |
A few things in that table are decisions, not translations. The slugs aren’t word for word: “history” is Firmengeschichte (company history) in German, and the Slovak “foreign partners” is just “partners” in English. A slug should be what a native speaker would call the page, which is the translator’s call more than the developer’s. The German slugs are also written without umlauts, as uber-uns and auslandische-partner. That’s one of three ways to do it: drop the umlaut, spell it out the German way (ueber-uns), or keep über-uns, which Google accepts as long as the URL is UTF-8 and escaped properly. Pick one before launch and use it everywhere.
Each slug also belongs to exactly one language. /en/dienstleistungen is a 404, and that’s what you want: if every slug worked under every language prefix, each page would have nine addresses instead of three.
The cost of translated slugs shows up later, when someone renames a page. With one slug for all languages, a rename is one redirect. With translated slugs it can be three, plus updating the hreflang on the other two versions in the same deploy, so they don’t point at the old address. Google’s page on redirects (14 April 2026) recommends a permanent server-side redirect (301) for a page that has moved for good.
The checklist before a new language goes live
None of this needs me. It needs a list of your pages and an afternoon.
- Make a table of every page, one row per page and one column per language. An empty cell means that page has no hreflang to that language, and you decide now where its language switch goes.
- Decide the address pattern once: language folders or not, translated slugs or not, and whether the default language gets a prefix. Changing it later means redirecting every page.
- Generate hreflang from the same data that builds the pages, never from a hand-typed list. If a page isn’t built, its hreflang can’t exist.
- Treat drafts and half-finished translations as missing. A page that’s “almost translated” is a page in one language.
- Check the format on three real pages in view-source: each page lists itself, every link goes both ways, the URLs are full, and the codes are valid (
en-GB, neveren-UK). - Make the canonical of every page point to itself, in its own language.
- Choose your
x-default. On this site it’s English. A Slovak company selling abroad might pick English too, rather than Slovak. - Make the language switch go to the same page in the other language, and decide what happens when there isn’t one.
- Translate the whole page: the
<title>, the meta description, menu, footer, image descriptions, form errors and the cookie banner. A German page with an English title is still a page Google has to guess about. - Don’t redirect visitors by IP address or browser language. A small banner suggesting the other language is fine; moving people is not.
- When a slug changes, add a 301 from the old address and update the hreflang on every other language version in the same deploy.
- After launch, open the sitemap and a few pages in each language and check the alternates again. If you use IndexNow for Bing, send the new pages there as well. Google doesn’t use IndexNow; it reads your sitemap from Search Console on its own schedule.
Everything in the second part of this article runs on the site you’re reading, and you can check it: open any article or case study here, view the source, and compare the hreflang links with whether the other language really exists. If you’re about to add a language and want this done once, properly, that’s what my website development work covers: separate pages per language, translated addresses, hreflang and redirects tested before launch. If you already have a site and want a second pair of eyes, send me the address for a free audit. Within two working days you get a short write-up of what I’d fix first.
Sources
- Google Search Central: Tell Google about localized versions of your page (hreflang), last updated 21 September 2026
- Google Search Central: Managing multi-regional and multilingual sites, last updated 10 December 2025
- Google Search Central: How Google crawls locale-adaptive pages, last updated 10 December 2025
- Google Search Central: How to specify a canonical URL (canonical and hreflang), last updated 10 July 2026
- Google Search Central: Redirects and Google Search, last updated 14 April 2026