Be the first user to complete this post

  • 0
Add to List

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 api.myexample.com (assuming that you site is myexample.com). 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.




Also Read:

  1. Event coordinates and element dimentions on a page
  2. Getting started with automation testing for webrtc applications
  3. Setup nginx with multi domain websites running on nodejs