Setup custom domains on heroku |
Heroku Setup
First add the heroku addon
heroku addons:add custom_domains
Then add the domain(s) you are using
heroku domains:add www.mydomain.tld
Remove domains with
heroku domains:remove mydomain.tld
or remove all domains
heroku domains:clear
DNS Setup
Point the A record for your domain (root domains) to the heroku IP's found at http://devcenter.heroku.com/articles/custom-domains These are currently
75.101.163.44 75.101.145.87 174.129.212.2
For subdomains (e.g. www.mydomain.tld) You can point the subdomain using a CNAME to appname.herokuapp.com (for cedar stack apps)
I like to use the root domain and the www domain for my app, and create a mail.mydomain.tld for the MX server pointing at my mail server.
For secondary tld domains I redirect them at the registrar level so that the app only needs to respond to one .tld
Post new comment