Adding your custom domain to Heroku App

Imran Sayed
2 min readOct 17, 2018


In order for your Heroku app to be available on your custom domain like ( rather than domains like ), you need to point your custom domain to your Heroku app URL. To achieve this you need to add your custom domain to Heroku which will give you a DNS target domain. The DNS target domain can then be added to your domain hosting sites CNAME. And this will make your app available at

1-Go to
2-Click on your app name and then click on Settings
3-Then click on add domain
4-Add your domain and click save.

Then you will see your domain with DNS target added. e.g.

5-Now add the DNS target created above ( without www ) e.g. to your DNS CName record on your dashboard panel of the site where you have purchased your domain from ( e.g. Godaddy ). Select a custom value to 600secs or less in TTL

6-Now go to Heroku CLI on your terminal and run the below commands.

heroku login

Then run below command

// Below command will enqueue your domain for addition
heroku domains:add
// Below command will keep waiting and result in success once the domain is added
heroku domains:wait '' // this command

Your Heroku application will now be available on



Imran Sayed

👤 Full Stack Developer at rtCamp, Speaker, Blogger, YouTuber, Wordpress, React, Node, Laravel Developer