Usha Guduri

CNAME Vs. A Record

This is one of a nuances of the Domain Name System (read nuisances as well, if you dont quite understand it and end up mixing the two, running with pants on fire that the website is not working!)

Called the Canonical Name, it is similar to saying Jane Smith and Mrs.Smith are the same person. Almost all the websites have a single default CNAME for www. If you see sites where works but fails, it most likely is because of this missing CNAME which looks as simple as:


And all it is saying is that is just another name for, so serve the request as if it went directly to A-record on the other hand is telling you where to find Jane Smith and Mrs.Smith. In cyberspace, its the address of the machine capable of servicing the requests to and looks equally simple as:

1 A

In essence, the minimum DNS entry when you set up a new site should look like:


The order does not matter as much, but note that each CNAME needs a minimum of 2 lookups to get to the machine to talk to.

So choose wisely, depending on how many hoops are required to finally get to the machine!

For the geek in you, the trailing . in the domain names is for the imaginary root server in the internet hierarchy and is called a FQDN notation (Fully Qualified Domain Name)