Routing
Choose a route model that search engines can crawl
A locale should be part of the URL or domain structure, not only a cookie or browser preference. App Router layouts let you share page structure while resolving content for [locale].
- Use /fr/page, fr.example.com/page, or a documented country-domain model.
- Avoid serving multiple languages from one URL based only on detection.
- Keep route and locale validation in one boundary.
app/
[locale]/
products/
[slug]/
page.js
opengraph-image.js
layout.js
sitemap.js
// /fr/products/widget
// /de/products/widget