Add new custom domain to Heroku
heroku domains:add www.example.com heroku domains:add example.com
Add both with www. and no www. domain names.
It will look like the following
Login to Godaddy and add/edit host:www to your heroku app, it will looks like follows:
Add a forwarding rule to that http://example.com will be directed to http://www.example.com