st3fan
st3fan

Reputation: 1640

Assign domain to a subdomain in a Heroku application

I am not sure if the following scenario can be done on Heroku:

Any help is appreciated. Thanks!

Upvotes: 0

Views: 46

Answers (2)

catsby
catsby

Reputation: 11352

The Heroku Dev Center has an article that is kept up to date and answers all of this:

You CNAME *.example.com to your Heroku app, and you add *.example.com to your Heroku domains. It's up to your application code to make sense of it all after that.

Upvotes: -1

st3fan
st3fan

Reputation: 1640

I to get it working like this:

Add the following CNAMES

  • *.example.com -> myapp.herokuapp.com
  • bar.com -> foo.example.com (look for host instead of subdomain inside application and load the needed data based on that)

Add the domaines on Heroku

  • *.example.com
  • bar.com

Upvotes: 0

Related Questions