A Record vs CNAME Record

June 27, 2019 | No comments
The A and CNAME records are the two common ways to map a host name (“name”) to one or more IP addresses.

The A record points a name to a specific IP. For example if we want blog.knolare.com to point to the server 195.195.195.195, we can have a A record to map the subdomain name with the IP address.
So with A record we have to know the target IP address to which the request should be routed.

On the otherhand A CNAME record, or Canonical Name record, is a pointer of one name to another. A CNAME record points a hostname to another name that is already created for a server or system.

Advantage of CNAME is that we can update the mapping in the CNAME entry without bothering about the IP address changes. This is benefitial in Cloud environment where based on the need or user demography or user type we might want to target the user to a different service instance whose IP address could be not known ahead of time.


                                                             Simple DNS Resolution

Generally the Cloud platform will provide a CNAME target like GCP provides c.storage.googleapis.com. as the target CNAME. Internally GCP can reassign different hardware with different IP's without disturbing the DNS resolution to external world.

No comments :

Post a Comment

Please leave your message queries or suggetions.