platforms
platforms copied to clipboard
Steps for setting up custom domains
Hi,
Thanks for the detailed guide! We've got custom subdomains working with this setup. As a next step we wanted to allow our users to use their own domains to host our site on their subdomain, like it's done on the guide for platformize.co
. To illustrate:
app.myapp.co
- working
myuser.myapp.co
- working
userdomain.com
- my user's website
xyz.userdomain.com
- should point to myuser.myapp.co
while keeping xyz.userdomain.com
in the URL bar. Need help on this bit
- Are there changes to be made to middleware code on our side?
- What are the DNS entries we should be instructing our users to add?
- Is this setup done somewhere in this repo as well?
We're going to be doing this as a one-off for large clients, so even if it requires code changes/manual steps that's ok with us. Thanks!
Hi @amitav13
I'm struggling with this exact setup. I can't get the user subdomain working. I get a 404 DEPLOYMENT_NOT_FOUND
. Hopefully this issue gets some traction 🤞 . If you do wind up solving this before anyone responds here, could you post how ya figured it out? Thanks (and I'll do the same!).
I'm getting this issue as well. Will try the newer version and write back.
app.myapp.co - working myuser.myapp.co - working userdomain.com - my user's website xyz.userdomain.com - should point to myuser.myapp.co while keeping xyz.userdomain.com in the URL bar. Need help on this bit
Hey y'all! This exact setup is actually fully supported now with the new version! If you want you can even redirect the myuser.myapp.co
subdomain to the custom domain too: https://github.com/vercel/platforms/blob/main/app/%5Bdomain%5D/layout.tsx#L98-L105
Here's the updated guide – feel free to give it a try and let me know if it works