This is a guide on how to configure multiple domain providers with a Rails app (or any web app actually!) on Heroku and GoDaddy
- On the project folder you need to run the
heroku domains:add heroku domains:add www.example.com
where thewww.example.com
is your actual domain. Remember you can always add multiple domains this way.
- Sign in to GoDaddy, go to the domains list, pick your domain or click on the
manage
button. This will take you to your domain configuration. - Select the DNS ZONE FILE tab
- Under the CName (Alias) table edit the one with the
www
which points to@
- A window will pop, you have to update the POINTS TO field to match your heroku app, something like:
A naked domain is the url we commonly write on the browser navigation bar without the www
. This is easily achieve with a forwarding
:
- In the same window than the last one, but on the SETTINGS tab
- The fourth option is about
forwarding
, click onmanage
- A window will pop, click on the UPDATE FORWARDING button and on the FORWARD TO: field type in your full domain (www.example.com)
- The redirect type should be
301 (Permanent)
and the forward settings should beForward only
- Make sure you have the
Update my nameservers and DNS settings to support this change. (Recommended)
option checked.
Thats it, you are done! You just have to wait until the server propagates and resolves correctly.