Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

heroku subdomains on different apps?

If you have a domain name pointed at heroku can you use it with subdomains across heroku apps? If so where can I find info about how to set this up?

main website - heroku app

    www.mydomainname.com

game site - different heroku app

    game.mydomainname.com
like image 546
Tabbyofjudah Avatar asked Oct 31 '22 15:10

Tabbyofjudah


1 Answers

Each subdomain should be a CNAME to the Heroku app you want.

In your DNS provider (something like GoDaddy, DNSimple, et. al), setup like so:

subdomain | record type | end point
www | CNAME | main-app.heroku.com
game | CNAME | other-app.heroku.com

Make sure you add the matching domain to the corresponding app with $ heroku domains:add

  • https://devcenter.heroku.com/articles/custom-domains
like image 121
catsby Avatar answered Nov 15 '22 10:11

catsby