The DNS CNAME records create aliases for one hostname ("Alias Name") to another hostname ("Canonical Name"). In simple terms, DNS CNAME record maps one hostname (say www.example.com) to another hostname (example.net), instead of mapping them to IP addresses of hosts as compared to DNS A and AAAA records.
DNS CNAME record requires three inputs:
DNS CNAME records can create aliases of one hostname to another. Different hostnames (e.g. www.example.com, blog.example.com,..) can have the same DNS data (e.g. example.com) for hostname, however, DNS name of each CNAME record for a domain should be unique among its CNAME, A and AAAA records. For example, if the domain name "example.com" has a DNS CNAME record "www.example.com" pointing to a hostname "example.net", it cannot have another CNAME, A or AAAA record for the same hostname "www.example.com". Also, the DNS name field cannot be empty, since CNAME records cannot be set for root domains (like "example.com").
DNS records are hosted on the Internet through DNS hosting services. If you are using SlickAlpha DNS, check this related guide to learn how to add a DNS record on your SlickAlpha account.
DNS records can be queried directly on your system terminal using the dig command. To check your DNS CNAME records on the browser, try our free DNS Lookup tool.
DNS CNAME records are useful in creating aliases for sub-domains instead of pointing them directly to host IPs using DNS A or AAAA records. When the hostname is entered on a web browser, the DNS servers resolve recursively and return the destination IP address to the client, instead of returning the hostname mapped in the CNAME record.