/blog/*— Blog application/dashboard/*— Dashboard application/*— Main website
Navigating between routes in the same zone is a soft navigation (no page reload). Navigating between zones is a hard navigation (full page reload). Keep frequently visited pages together in the same zone.
Defining a zone
A zone is a standard Next.js application. Set anassetPrefix to avoid conflicts with other zones’ static assets:
/blog-static/_next/.... The default zone that handles unrouted paths does not need an assetPrefix.
Routing requests to the correct zone
Userewrites in the main application’s next.config.js to proxy requests to other zones:
destination should point to the zone’s production domain or localhost during local development.
Using middleware for dynamic routing
If you need conditional routing (for example, based on a feature flag during a migration), use middleware:Linking between zones
Use an<a> tag instead of <Link> for cross-zone navigation. Next.js’s <Link> component attempts to prefetch and soft-navigate, which doesn’t work across zone boundaries:
