What is the correct way to connect a Heroku app with a custom domain?
This is how I did it in the past:
Point Godaddy\'s DNS to heroku\'s provided t
I kept skipping this step because the custom domain already showed up in my Heroku app. Ran this and it started working.
heroku domains:add www.yourwebsite.com
Bonus: Want every page to be secure SSL? Use this awesome NPM package https://www.npmjs.com/package/force-ssl-heroku
Heroku domains:add www.yourwebsite.com --app <app name>
This is the best way to do it as it needs to know which specific app to point to.
This worked for me, but I had to include --app <app name>
at end of the command. Like this:
heroku domains:add www.yourwebsite.com --app <app name>
For the app name, it is the app name you used when creating the app in Heroku.