Next.js Discord

Discord Forum

Multi-tenant top level domain

Answered
Saltwater Crocodile posted this in #help-forum
Open in Discord
Saltwater CrocodileOP
Just to make sure I understand how Next and Vercel handle multi-tenant apps, you can have multiple top-level domains from the same code base, correct? MyAwesomeSite.com, MyAwesomeSite.net, or MyAwesomeSite.ca?
Answered by B33fb0n3
In the background it's just a middleware, that rewrites every request to the correct location. See here: https://github.com/vercel/platforms/blob/main/middleware.ts
View full answer

6 Replies

Answer
@Cape lion Will the multi tenant feature work while self hosting too??
if the middleware gets executed and the request will be rewritten, yes
@B33fb0n3 if the middleware gets executed and the request will be rewritten, yes
Cape lion
Cool. I will try this. Thanks
Saltwater CrocodileOP
Awesome!