What is CNAME and how it is used

CNAME, or as it is known, the Canonical name record - is a type of record in DNS that is used to show that the domain name is the alias to another domain.
What is CNAME and how it is used

CNAME, or as it is known, the Canonical name record - is a type of record in DNS that is used to show that the domain name is the alias to another domain. All the information, including subdomains, IP-addresses and other data, are determined by canonical domain.

Such CNAME record proves to be very convenient in cases, when you need to start different services, such as for example FTP-server and webserver on different ports of one IP-address. Thus, you may point www.mydomain.com and ftp.mydomain.com to domain mydomain.com and make the following changes to the A-record of domain DNS. The domain itself, will point to the IP-address. Thus in case if IP-address changes it will be needed to modify only one setting within the network - in the A-record of DNS.

Also it is necessary to know that the CNAME records should always point to another domain and not directly to IP-address. The domains that are used for email, cannot have CNAME record. Of course, on practice it may work,  but the results can be rather unpredictable and it may have not desired effects.

 

comments

Add comment:


Comments