Skip to content

Instantly share code, notes, and snippets.

@rodrigo-galba
Created December 27, 2017 02:40
Show Gist options
  • Save rodrigo-galba/7fff324a57d0910c4685914f3193dc29 to your computer and use it in GitHub Desktop.
Save rodrigo-galba/7fff324a57d0910c4685914f3193dc29 to your computer and use it in GitHub Desktop.
Heroku + Godaddy

This is a guide on how to configure multiple domain providers with a Rails app (or any web app actually!) on Heroku and GoDaddy

Setting up Heroku

  1. On the project folder you need to run the heroku domains:add heroku domains:add www.example.com where the www.example.com is your actual domain. Remember you can always add multiple domains this way.

Setting up GoDaddy

  1. 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.
  2. Select the DNS ZONE FILE tab
  3. Under the CName (Alias) table edit the one with the www which points to @
  4. A window will pop, you have to update the POINTS TO field to match your heroku app, something like:

CNAME GoDaddy Configuration

Handle naked domains

A naked domain is the url we commonly write on the browser navigation bar without the www. This is easily achieve with a forwarding:

  1. In the same window than the last one, but on the SETTINGS tab
  2. The fourth option is about forwarding, click on manage
  3. A window will pop, click on the UPDATE FORWARDING button and on the FORWARD TO: field type in your full domain (www.example.com)
  4. The redirect type should be 301 (Permanent) and the forward settings should be Forward only
  5. Make sure you have the Update my nameservers and DNS settings to support this change. (Recommended) option checked.

CNAME GoDaddy Forwarding

Thats it, you are done! You just have to wait until the server propagates and resolves correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment