Difference between CName and A Record

Key difference: Both CName and A Record are types of resource record in the Domain Name System (DNS). A Record maps a domain name to one or more IP addresses. CNAME record, on the other hand, maps a domain name to another domain name.

Websites are uniquely identified by IP addresses. IP stands for Internet Protocol. An IP address is a numerical label which is assigned to a device that connects to the Internet using the Internet Protocol for communication, i.e. every Internet connection. Websites, similarly have a corresponding IP address for each webpage. However, as these IP addresses are not easy to remember, we simplify things by using domain names.

Both CName and A Record are types of resource record in the Domain Name System (DNS). Resource records are database records which are stored in the zone files of the DNS. The DNS is responsible for implementing a distributed, hierarchical, and redundant database for information associated with Internet domain names and addresses.

A Record maps a domain name to one or more IP addresses. For example: going to mydomain.com will prompt the browser to perform a DNS lookup, which will result in the corresponding IP address, such as 111.222.333.444.

CNAME record, on the other hand, maps a domain name to another domain name. CNAME record stands for Canonical Name record. A CNAME record is a type of resource record that specifies that the domain name is an alias of another canonical or generally accepted domain name. Webopedia defines CNAME record, as “a record in a DNS database that indicates the true, or canonical, host name of a computer that its aliases are associated with. A computer hosting a Web site must have an IP address in order to be connected to the World Wide Web. The DNS resolves the computer’s domain name to its IP address, but sometimes more than one domain name resolves to the same IP address, and this is where the CNAME is useful. A machine can have an unlimited number of CNAME aliases, but a separate CNAME record must be in the database for each alias.”

For example: if there are several sub-domains, such as www.mydomain.com, ftp.mydomain.com, mail.mydomain.com, etc., they can be linked together by use to CNAME. Hence, inputting any of the sub-domains will lead to the main domain name, such as mydomain.com.

 

CName

A Record

Value (Decimal)

5

1

Defining RFC

RFC 1035

RFC 1035

Description

Canonical name record

address record

Function

Alias of one name to another: the DNS lookup will continue by retrying the lookup with the new name.

Returns a 32-bit IPv4 address, most commonly used to map hostnames to an IP address of the host, but also used for DNSBLs, storing subnet masks in RFC 1101, etc.

Image Courtesy: fasthosts.co.uk, wix.com

Most Searched in Pregnancy and Parenting Most Searched in Business and Finance
Most Searched in Arts and Humanities Most Searched in Cars and Transportation
Acne vs Boils
Web Developer vs Web Designer
ASPCA vs SPCA
URI vs URL

Add new comment

Plain text

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.