Pointing your Heroku app to a Custom Domain, what a nightmare at first!

Charlie K
4 min readDec 2, 2020

--

Web hosting and Domain names — here is what I should have known

After purchasing a domain I was so sure I would get my app up and running in a few hours. However, I was treated to a rude shock when even after a long 24hrs the webpage was still down. The process really tested my patience.

You would think YouTube would be my guide, but all those hours of watching and re-watching tutorials didn’t yield the expected results, my bad😥. In this article I’ll show how to point your custom domain to Heroku app in 5 easy steps.

What you need

· Custom Domain — mine was from Truehost

· App hosted on Heroku

Step 1: Purchase a domain

Anyone can buy a domain. To do so visit a domain Truehost, HostGator or GoDaddy and key in the domain you want to buy. Incase that domain isn’t already registered to another person or business, you will be able to pay a fee which is to be renewed annually. Make sure to buy something catchy for your particular need. Take advantage of Black Friday sales!🛒

After buying the domain you will be redirected to your portal. For my case I used Truehost.

Your domain will be something like — www.yourdomain.co.ke

Step 2: Add domain to Heroku

If u haven’t created an app already create on one Heroku. Navigate to the app dashboard settings and add your custom domain

You will need to add both — yourdomain.co.ke and www.yourdomain.co.ke as Domain names. These are to be replaced with the domain you purchased above.

Step 3: Install PointDNS add-on

To point the root of your domain to Heroku, you will need to install the PointDNS add-on. The add-on is free but you will need to add credit card details to Heroku to verify your identity.

To install this add-on, navigate to your app on Heroku and click on the resources link.

Heroku add-ons

After installing the PointDNS add-on, click on the add-on to redirect to the PointDNS dashboard

Navigate to your domains where you will find the settings below already preconfigured.

PointDNS Records

Step 4: Change Name Servers on your Domain portal

Login to your domain provider(Truehost) in our case and change the name servers to match the information provided by PointDNS.

In my case I navigated to Olitt where I added my CNAME as the Heroku app URL.

Olitt

Consult with your DNS provider for specific instructions to create CNAME and NS records.

DNS Records

On Truehost portal I changed my name servers to reflect PointDNS.

Truehost portal

Step 5: Step back and wait

Finally, the hard part. Depending on Domain provider the changes might take from a few hours to around 48 hours. It would be a good idea to just give the it the rest of the day and check up tomorrow.

After a not so long of a wait your Heroku application will now be available on www.yourdomain.co.ke

My biggest take, be patient😎😂

--

--

Charlie K
Charlie K

Written by Charlie K

learn, innovate repeat. Writer, web developer ,tech & nature enthusiast. My posts are abstract😜

No responses yet