Nextjs with multi domain
Unanswered
Fire ant posted this in #help-forum
Fire antOP
Hi everyone,
We have a Next.js project using the Pages Router, and our goal is to support multiple domains such as "domain.com", "domain.eu", and "domain.co" from the same codebase and deployment.
Most of the website is shared, but some content, images, SEO metadata, and possibly a few sections differ depending on the domain.
We’re looking for the best production-grade architecture and implementation strategy for this setup.
Some questions we’re considering:
- What is the best way to detect and manage domains in Next.js Pages Router?
- Should domain handling be done through middleware, SSR, rewrites, or another approach?
- What is the recommended structure for managing domain-specific assets/content cleanly?
- Any SEO considerations or pitfalls for multi-domain setups?
- Is using a single deployment the best approach for scalability and maintenance?
We have a Next.js project using the Pages Router, and our goal is to support multiple domains such as "domain.com", "domain.eu", and "domain.co" from the same codebase and deployment.
Most of the website is shared, but some content, images, SEO metadata, and possibly a few sections differ depending on the domain.
We’re looking for the best production-grade architecture and implementation strategy for this setup.
Some questions we’re considering:
- What is the best way to detect and manage domains in Next.js Pages Router?
- Should domain handling be done through middleware, SSR, rewrites, or another approach?
- What is the recommended structure for managing domain-specific assets/content cleanly?
- Any SEO considerations or pitfalls for multi-domain setups?
- Is using a single deployment the best approach for scalability and maintenance?