Multilingual SEO: Choosing a URL Structure and Setting Up hreflang
Give every language version its own URL and choose a structure you can maintain. For most businesses that means folders on one domain, such as example.com/de/. Separate domains make sense when each market is run as its own site; URL parameters such as ?lang=de and language switching through cookies are best avoided. Then connect the versions with hreflang: every page lists itself and all its translations, with correct language codes and full URLs, and an x-default for everyone else. This article covers that technical side. For what to translate and who keeps the versions in sync, see planning a multilingual website.
The basic rule: one URL per language
Google's guidance on multilingual sites is clear on a few points:
- Use a different URL for each language version rather than cookies or browser settings to change the language of the same address.
- Keep one language per page. Translated navigation around untranslated main content creates a poor experience.
- Let people switch with links to the other language versions of the same page.
- Don't redirect automatically based on a guess. Google advises against redirecting users by assumed language and says "IP location analysis is difficult and generally not reliable". Googlebot crawls mostly from the US and doesn't vary its location, so automatic rerouting can stop it from finding all versions. Suggesting another version with a visible notice is safer than forcing it.
Four URL structures compared
| Structure | Example | Strengths (per Google) | Weaknesses (per Google) |
|---|---|---|---|
| Country domain | example.de | Clear geotargeting, server location irrelevant, easy separation of sites | Can be expensive or unavailable, more infrastructure, targets a single country only |
| Subdomain | de.example.com | Easy to set up, different server locations possible, easy separation | Users may not know whether "de" means a language or a country |
| Subfolder | example.com/de/ | Easy to set up, low maintenance on one host | Single server location, sites harder to separate |
| URL parameter | example.com?lang=de | – | Not recommended |
In practice the choice is mostly about organisation, not ranking tricks:
- Subfolders suit most companies: one site, one CMS, one hosting account, one set of analytics.
- Country domains suit businesses with separate markets – their own prices, delivery terms, legal texts or teams – and a domain that customers in that country expect.
- Language is not the same as country. A country domain targets one country. If you write German for Germany, Austria and Switzerland alike, a single /de/ folder may serve them better than three domains with the same text.
Whatever you pick, use words in your audience's language in the URL. Google's URL guidance recommends this, transliterated where applicable, with non-ASCII characters percent-encoded. Cyrillic addresses work, but when copied into an email they often turn into long strings of % codes. Many Bulgarian sites, ours included, use transliterated Latin addresses instead.
Two real setups
Our own site uses two domains. Bulgarian runs on seoandweb.bg and English on seoandweb.eu. Until the move both lived in folders, /bg/ and /en/, on seoandweb.eu; splitting them took about 45 permanent (301) redirects, described in redesigning without losing rankings. Every page and every translated blog post points to its counterpart, and x-default points to the English version. The home page carries:
<link rel="alternate" hreflang="bg" href="https://www.seoandweb.bg/"><link rel="alternate" hreflang="en" href="https://www.seoandweb.eu/"><link rel="alternate" hreflang="x-default" href="https://www.seoandweb.eu/">
Both domains carry the same three lines, and each page's canonical points to itself.
auto-data.net uses folders on one domain – /en/, /de/, /it/ and many more. It shows a detail that trips people up: folder names are for people, but hreflang values must be language codes. The Greek version lives in /gr/ but is marked el, the Swedish one in /se/ is marked sv, and the Czech one in /cz/ is cs. Some languages also list regional variants – it-IT and it-CH point to the same Italian version – and x-default points to English.
Language codes cause trouble outside search too. When the codes for Italian in that project changed from "it" to "it,it-IT,it-CH", an Italian user of the mobile app saw it stay in English until the codes were normalised in the API. Handle language codes in one place – see one API for a website and a mobile app.
How hreflang works
- Three equivalent methods:
<link>tags in the page head, HTTP headers (useful for PDFs) or an XML sitemap. Google treats them as equivalent, and using all three adds nothing. For large sites the sitemap is often easier to manage. - Return links are mandatory. "Each language version must list itself as well as all other language versions." If two pages don't point to each other, Google ignores the annotations.
- Correct codes. The language uses ISO 639-1 (bg, en, de); an optional region uses ISO 3166-1 Alpha-2 (en-GB, de-AT). A region on its own is not allowed, and codes such as EU, UN or UK are ignored – Britain is GB.
- Full URLs including https. The versions may sit on different domains.
- x-default marks the fallback for visitors whose language you don't serve – typically a language selector, an automatically redirecting home page or, as on our site, the main international version.
- Pair each page with its real counterpart. A translated article points to its translation, not to the other language's home page. A page that exists in only one language simply has no alternates.
- Each version is its own canonical. Google treats localised pages as duplicates only "if the main content of the page remains untranslated", so a properly translated page should not point its canonical to another language.
What hreflang does not do
Google says it does not use hreflang or the HTML lang attribute to detect a page's language; it works that out from the visible content. hreflang tells Google which versions belong together so it can show the right one – it doesn't make a weak page rank, and it can't turn a page with an English menu and Bulgarian main text into an English page.
The lang attribute still matters for people. The W3C explains that when a page's language is identified, screen readers "can load the correct pronunciation rules", and browsers and assistive technologies render text more accurately. Set it correctly on every language version.
Common mistakes to check
- Missing return links – the English page lists the Bulgarian one, but not the other way round.
- Country codes used as language codes: gr instead of el, se instead of sv, cz instead of cs, uk instead of en-GB.
- Relative URLs, or http where the site runs on https.
- Alternates pointing to redirected, noindexed or deleted URLs, or to the home page instead of the matching page.
- Canonicals pointing from one language to another.
- Automatic redirects by IP or browser language with no way to switch back.
- Pages that mix languages because only the template was translated.
- hreflang typed by hand and forgotten when a page is added, moved or deleted. It is far safer to generate it from the link between a page and its translations in the CMS, so adding a translation updates every version.
Most of these problems are cheaper to prevent than to find later. If you are planning a multilingual site or moving to a new structure, we build URL schemes, language switchers and hreflang into the site as part of website development, and prepare localised texts through content marketing. Contact us to talk about your languages and markets.