URL Structure Patterns for i18n
You'll learn the three main approaches for structuring multilingual URLs and when to choose each one.
When building internationalized sites, you need to decide how to represent different languages in your URLs. This choice affects SEO, user experience, caching, and infrastructure complexity.
The Three Main Patterns
Subdirectories (Path-Based)
example.com/en/about
example.com/es/about
example.com/fr/about
The language code appears as the first path segment. This is the most common approach because it keeps everything under one domain, making SSL certificates and analytics simpler. Search engines treat each subdirectory as part of the same site, consolidating domain authority.
Subdomains
en.example.com/about
es.example.com/about
fr.example.com/about
Each language lives on its own subdomain. This allows independent hosting and CDN distribution per language, useful for region-specific infrastructure. However, search engines may treat these as separate sites, diluting SEO authority. You'll also need wildcard SSL certificates.
Query Parameters
example.com/about?lang=en
example.com/about?lang=es
example.com/about?lang=fr
Language specified via query string. This is the simplest to implement but problematic for SEO—search engines may ignore parameters or struggle to index properly. Users can't easily share language-specific URLs, and browser history becomes confusing.
Trade-offs Summary
Subdirectories offer the best balance: good SEO, simple infrastructure, and clean URLs. Subdomains work when you need geographic distribution or isolated deployments. Parameters should generally be avoided for public-facing internationalization—they're better suited for user preference overrides alongside a primary URL pattern.
Key Takeaway: Subdirectories (/en/, /es/) provide the best combination of SEO benefits, infrastructure simplicity, and user experience for most internationalized websites.