Handling Multi-Domain Routing in Next.js for a Marketplace #45215
Unanswered
adevinwild
asked this question in
Help
Replies: 2 comments
-
For next.js part, you can use middleware, see example . For hosting on Vercel, you open a ticket with their support. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
use the middleware to extract the subdomain and rewrite the request to be something like this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
As we work on building our marketplace, we're thinking ahead to the possibility of adding sub-domains and custom domains.
We want to make sure that each seller can have their own "page" that searches for their products on the backend (keep in mind, we already have a separate server running on Node for all the business logic).
Our question is
How can we use a single instance of Next.js to handle routing for multiple domains and manage parameters (like storeId) based on the domain?
For example:
🚩 And especially how to manage SSL certificates...
Any suggestions or solutions would be greatly appreciated! 🤔💻
Beta Was this translation helpful? Give feedback.
All reactions