Overview - Domain routing for locales
What is it?
Domain routing for locales is a way to serve different versions of a website based on the visitor's language or region by using different domain names. Instead of changing the language through URL paths or query parameters, the website automatically shows the right language version depending on the domain the user visits. For example, users visiting example.fr see the French version, while example.com shows the English version. This helps create a natural and clear experience for users from different countries.
Why it matters
Without domain routing for locales, websites often rely on URL paths or cookies to switch languages, which can confuse users and hurt search engine rankings. Using separate domains for each locale makes it easier for users to remember and trust the site, improves SEO by targeting country-specific domains, and simplifies legal or content differences per region. It also helps businesses appear local and relevant to their audience, increasing engagement and sales.
Where it fits
Before learning domain routing for locales, you should understand basic Next.js routing and internationalized routing concepts. After mastering domain routing, you can explore advanced localization techniques like dynamic content translation, user preference detection, and server-side rendering optimizations for multilingual sites.