How to configure heroku application DNS to Godaddy Domain?

The trick is to

  1. create a CNAME for www.myapp.example to myapp.heroku.com
  2. create a 301 redirection from myapp.example to www.myapp.example

There are 2 steps you need to perform,

  1. Add the custom domains addon and add the domain your going to use, eg www.mywebsite.example to your application
  2. Go to your domain registrar control panel and set www.mywebsite.example to be a CNAME entry to yourapp.herokuapp.com assuming you are using the CEDAR stack.
  3. There is a third step if you want to use a naked domain, eg mywebsite.example when you would have to add the IP addresses of the Heroku load balancers to your DNS for mywebsite.example

You can read more about this at http://devcenter.heroku.com/articles/custom-domains

At a guess you've missed out the first step perhaps?

Following the announcement of Bamboo's EOL proxy.heroku.com being retired (September 2014) for Bamboo applications so these should also now use the yourapp.herokuapp.com mapping now as well.


I used this videocast to set up my GoDaddy domain with Heroku, and it worked perfectly. Very clear and well explained.

Note: Skip the part about CNAME yourdomain.example. (note the .) and the heroku addons:add "custom domains"

http://blog.heroku.com/archives/2009/10/7/heroku_casts_setting_up_custom_domains/


To summarize the video:

  1. on GoDaddy and create a CNAME with

    Alias Name: www
    Host Name: proxy.heroku.com
    
  2. check that your domain has propagated by typing host www.yourdomain.example on the command line

  3. run heroku domains:add www.yourdomain.example

  4. run heroku domains:add yourdomain.example

It worked for me after these steps. Hope it works for you too!

However, things have changed. Check out this post: Heroku/GoDaddy: send naked domain to www

Tags:

Dns

Heroku