Need to know the difference between CNAME and an A Record to deploy your REST API? We got you covered.

If you are building a restful API using express/nodejs, it is likely that you will one day find yourself in a strange situation where you will want to create a subdomain such as (assuming that you site is

Then you open your registrar’s configuration, you figure out that you probably need to add some CNAME and A record entries. But what in the name of god are those two things.

This post is to help you get the gist of it in, lets say, 20 seconds!

difference between cname and a record

CNAME: Always points to another domain name.
A Record: Always points to an IP Address.

Usually, you will setup stuff just the way its shown in the diagram so that tomorrow even if you feel a need to change your host ip address, just update your A Record mapping and you’re good to go.

Ryan Sukale

Ryan Sukale

Ryan is just a regular guy next door trying to manage his life and finances.

You may also like...

Leave a Reply

Your email address will not be published.