How to change a Heroku domain to a custom domain?
This article explains the process in detail:
http://lifesforlearning.com/heroku-with-godaddy/
Example using www.example.com for example.herokuapp.com
In your heroku app use commands: heroku domains:add www.example.com heroku domains:add example.com
Go to your Godaddy specific domain page.
Clear all records you don't need. Add a CNAME record using www as host. For your target, go use command 'heroku domains' within your app and copy the url given for the www.example.com domain. Add an A record using @ as host and 50.63.202.1 as target (from documentation).
You are done, however it will take time for this change to propagate. In the interim use forwarding. Scroll down to the bottom of the GoDaddy site and enter forwarding information using https:// or http://, example.herokuapp.com, permanent (301), and forward only. Don't click the checkbox to update DNS.
1) Buy a domain from a domain-registrar (godaddy.com, networksolutions.com)
2) Add the domain to your heroku app => heroku domains:add
3) You'll see an option to alter DNS records on your domain service provider's account dashboard, add a "www" C-Name DNS record and point it to your heroku app (e.g. yourapp.herokuapp.com)