Becoming a MERN Developer: Adding Custom Domain to Your Heroku Application

Introduction

Two days ago, I wrote a portfolio website for my roomate’s border collie, after that I figure why not go get a custom domain? So here comes this step-by-step tutorial of adding your custom domain to your web application deployed on Heorku.

Register a new domain

There are couple of domain providers outta there, and most of them also offers hosting or even website builder service, but we will go with freenom for now.

After you have registered your freenom account, go to the service section and select “Register a New Domain”.

Then search for the domain name you preferred. With .tk domain, you don’t need to pay a penny, but however, you can also scroll down and pick any other fancier domain you like.

Check out your new domain, and leave freenom for a while as we also got some work to do on heroku.

Adding domain to your Heroku app

Go to the setting tab of your heroku dashboard, scroll down and find the “Domain” section. Ignore the existing domain I already added, what we are going to do is add your newly registered domain here.

Now go for “Add dmain”, type down the new domain with “www”. And now we have finished all the work on heroku, let’s go back to freenom.

Go to “My domain” section and click the “Manage Domain”.

Now go to “Manage Freenom DNS” section and:

  1. Add “www” as Name

2. Change type to “CNAME”

3. Set the Target as your heroku app url (eg.appname.herokuapp.com)

Now wait a little bit for the propogation, if you are not a patient person try use dnschecker.org to check the propogation status as below, once its down,

Congratulations, now your website is up and runing on your new domain!

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Your HTTP based API is not RESTful

Clickbait- Microservices are bad! So are monoliths

Job Opening: QA LEAD at IANULY Talent Accelerators.

Codecademy, basic toolkit for Python (10 hours in 15 minutes)

Merging multiple PDF files in Python

How to Run full validator node for Akash Network

Death by Falling — No Dead Zones, just Impact

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Yue

Yue

More from Medium

Learn about Koa JS

KoaJS

Part 5. Authentication with Open API 3.0

How to create simple translator with Translate API and JavaScript

Interact with Rest And Koa JS