what is cname in dns

9 months ago 40
Nature

A Canonical Name (CNAME) record is a type of resource record in the Domain Name System (DNS) that maps one domain name to another. It is used to create an alias from one domain name to another domain name, allowing multiple services to run from a single IP address. For example, CNAME records can be used to point ftp.example.com and www.example.com to the DNS entry for example.com, which in turn has an A record that points to the IP address. CNAME records must always point to another domain name, never directly to an IP address, and when a DNS resolver encounters a CNAME record, it restarts the checking at the canonical name and then returns the IP address. It is important to note that a CNAME record cannot coexist with any other records for the same name. The structure of a CNAME record includes the host name for the record, the time-to-live in seconds, and the domain name the CNAME maps to