简体   繁体   中英

How to allow users to point a custom domain to a subdomain of me app

I have an app where when users sign up, their content resides on a subdomain of my app, something like:

user1.example.com

Now I want them to be able to point their custom domain to this subdomain, so that when you visit user1s-domain.com you see the content that was on user1.example.com

The app is a Ruby on Rails app, currently hosted on Heroku. I'm happy to move it to AWS if I can't do what I need on Heroku.

Can you please advise on how this would be accomplished?

Heroku requires you to configure your account ahead of time with the domain(s) you want to serve. If your app was running on an EC2 server on AWS you could configure your server to accept any domain, at which point the user could point CNAME records to their subdomain.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM