Difference Between Similar Terms and Objects

Difference Between CName and A Record

mac_ipCName vs. A Record

Web sites are stored in locations that are uniquely identified by a group of numbers, which we know as IP addresses; but to access these sites, we usually type in their corresponding domain names, that are easier to remember. To get the correct IP address, your browser will contact a Domain Name Server, or DNS, and query its database for the IP address. An A Record is a type of resource record that directly points to the IP address. A CName, or Canonical Name record, is also a resource record, but it does not point to an IP address. Instead, it points to another domain address.

Although the point of having a DNS is to get the IP address of a given domain, a CName record is used to identify multiple domain names that point to the same IP address. There are a lot of uses for CName records, but the most prominent is when using multiple services that are running on the same machine or host. An FTP server will have a domain name of ftp.example.com, while an http server will use www.example.com. Despite this, they will be using the same IP address. Therefore, a CName entry will also exist in the database for ftp.example.com, that points to www.example.com. When looking for the IP address of ftp.example.com, the CName record is encountered, and the query is restarted using the new domain name. This procedure is repeated until an A Record is found that provides the IP address being searched. This way, only a single A Record that points to the right IP address is needed.

A CName record is very useful, but it can also create a problem that is systemic to its design. Given the example domain names provided above, it is possible that two CName records exist, where ftp points to www for the first, and the reverse for the second entry. As the query is restarted once a CName entry is found, having those two entries will result in an infinite loop that could crash the server. A Records do not have this problem, as they do not point to another domain name.

Summary:

1. A CName points to a domain name, while an A Record points to an IPv4 address.

2. Finding a CName record will spawn a new search, while finding an A Record will not.

3. Improper CName records can result in an endless loop, but A Records do not.

Sharing is caring!


Search DifferenceBetween.net :




Email This Post Email This Post : If you like this article or our site. Please spread the word. Share it with your friends/family.


3 Comments

  1. I totally disagree with the author’s opinion, “A CName record is very useful, but it can also create a problem that is systemic to its design.”

    A CName record cannot create a problem. What can possibly create a problem is when someone creates an improper record. The person or entity that created the record is what poses the problem, not the CName record.

  2. Thank you for the clarification of the differences. I do agree with Big though, it does seem like the problem is from a user, by creating a wrong record, which I could see as a simple mistake from someone that doesn’t know too much about this, hence I would recommend to ask support from your registrar, or a trusted acquaintance.

  3. Why would anyone make a www CName that points to http://ftp.domain.com?

    I appreciate the author’s concern, but like the other two commentators it seems more like he’s trying to scare people away from using CName records, when really it should be “Hey, here’s a fun fact: you can actually have CNames reference each other, which if you then performed a lookup on one it would create an infinite loop that could crash your DNS server. So, you know, don’t.”

Leave a Response

Please note: comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Articles on DifferenceBetween.net are general information, and are not intended to substitute for professional advice. The information is "AS IS", "WITH ALL FAULTS". User assumes all risk of use, damage, or injury. You agree that we have no liability for any damages.


See more about : ,
Protected by Copyscape Plagiarism Finder