Domain Masking? #50
-
Is it possible to have domain masking with Vercel ? For example, if I'm hosting a website (example.com) where each user has an "profile page" (example.com/bruno) Would the "bruno" user be able to forward bruno.com to example.com/bruno easily ? |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 14 replies
-
Bruno could create a deployment with vercel.json{
"rewrites": [
{ "source": "(.*)", "destination": "https://example.com/bruno$1" }
]
} |
Beta Was this translation helpful? Give feedback.
-
Did you find any other way to do it using the same project? I'm trying different ways by adding a domain to the same project and trying to rewrite without any luck. |
Beta Was this translation helpful? Give feedback.
-
Hey @styfle thanks for the answer. I think I should have asked my question in a better way. I'm essentially asking the same as @esteban89 - in other words, can we point multiple domains (not managed in Vercel) to specific URLs in our main site? A good example would be something like Dan.com where you can put domain names for sale and point them to a specific nameserver so that they redirect to the correct Dan.com page when visited. Eg. I put Bruno.com for sale on dan.com and therefore after I make some DNS changes to Bruno.com, it redirects to dan.com/landing-page/bruno Is something like that possible? |
Beta Was this translation helpful? Give feedback.
-
@brunocrosier I found a way to do it (but it's not pretty), Combining @styfle answer with Vercel API (https://vercel.com/docs/api) you can create a project, add a custom domain to it and upload the vercel.json file automatically from your code. |
Beta Was this translation helpful? Give feedback.
-
Update (1/20/2022): we rolled out the full example here: https://demo.vercel.pub/platforms-starter-kit Hey @brunocrosier! We recently rolled out a simple example that allows you to do exactly that – create unique content pages with a multi-tenant infrastructure using edge function rewrites and ISR. Each of your users gets assigned a unique username when they create their account, with the (usually paid) option to add a custom domain. We also helped read.cv implement this for their site and it went really well! |
Beta Was this translation helpful? Give feedback.
Update (1/20/2022): we rolled out the full example here: https://demo.vercel.pub/platforms-starter-kit
Hey @brunocrosier! We recently rolled out a simple example that allows you to do exactly that – create unique content pages with a multi-tenant infrastructure using edge function rewrites and ISR. Each of your users gets assigned a unique username when they create their account, with the (usually paid) option to add a custom domain. We also helped read.cv implement this for their site and it went really well!