I have deployed my dynamic website module on Vercel. I use React and Supabase. The URLs have the following format:
Site 1: https://web4all.vercel.app/1/home
Site 1: https://web4all.vercel.app/1/contact
Site 1: https://web4all.vercel.app/1/personalizePage
Site 2: https://web4all.vercel.app/2/home
Site 3: https://web4all.vercel.app/3/home
I would like to configure my domain names for each site so that I can access them with these URLs:
domainName1/home
domainName1/contact
domainName1/personalize
domainName2/home
domainName3/home"
however it seems i can not add a redirection toward vercel.app/1 for example. I’m sure someone already tried to do it but i did’nt find anything yet.
pawlean
(Pauline P. Narvas)
October 21, 2024, 9:27am
2
Hi, @alek-cendres ! Welcome to the Vercel Community.
I’ve seen this question (or something closely related) in the forum, most with solutions:
How can I tell which base URL to use my-app.vercel.app, my-app.com or some-other-domain.com in single project?
You variables only point on last domain I added in project. This breaks auth URL completelybecause I can’t differ between domain and tell which one to use. I can’t use req.header.host because I call function outside of request route context, it’s in utils
If there’s no way, why you offer multiple domains in project?
01
Let’s say I own the domain saas.com and want to build a SaaS product. The idea is that users log into a dashboard, customize options (like contact details), and click “Create My Website” to deploy a site to their own domain. The website is the same for every user, except for personalized details like contact info. In fact, 90% of the content of the site IS in fact their personal details. The only thing that’ll be the same across all of them is the booking form.
I’m building this with Next.js an…
I want to support multiple domains (e.g., app.example.com and admin.example.com). To clarify, I’m not trying to create a multi-tenancy app with custom domains .
These subdomains don’t share pages. app.example.com is for normal users and admin.example.com is for admins.
Should I create separate apps for each domain, or is there a way to assign separate domains for a set of routes inside a single Next.js project?
Let us know if that helps!
Hi Pawlean,
thanks for your answer ! I’m afraid the post you’re bringing used a different technologie. I’m not sure i could apply those solutions on my problem
system
(system)
Closed
November 26, 2024, 8:55pm
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.