How to configure heroku application DNS to Godaddy Domain?
The trick is to
- create a CNAME for
www.myapp.example
tomyapp.heroku.com
- create a 301 redirection from
myapp.example
towww.myapp.example
There are 2 steps you need to perform,
- Add the custom domains addon and add the domain your going to use, eg
www.mywebsite.example
to your application - Go to your domain registrar control panel and set
www.mywebsite.example
to be a CNAME entry toyourapp.herokuapp.com
assuming you are using the CEDAR stack. - 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 formywebsite.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:
on GoDaddy and create a CNAME with
Alias Name: www Host Name: proxy.heroku.com
check that your domain has propagated by typing
host www.yourdomain.example
on the command linerun
heroku domains:add www.yourdomain.example
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