DNS CNAME record definition
A DNS CNAME record is a DNS record type that organizations and individuals use to map an alias name to a canonical or true domain name. In other words, a DNS CNAME record maps subdomains that are linked to web pages, web-based content, or mail to the domain that is hosting the subdomain.
A DNS CNAME is typically used instead of a DNS “A” record. Both a regular domain and a subdomain can serve as aliases for another domain. A DNS CNAME record never points to an IP address, only to a domain name. A DNS CNAME record can also point to another DNS CNAME record. However, this practice is not efficient because it needs multiple DNS lookups to function. And this will slow down the user experience significantly. Also, DNS MX records and DNS NS records can’t point to a DNS CNAME record, only to a DNS “A” record or a DNS AAAA record.
DNS CNAME record use cases
- Many organizations use DNS CNAME records to direct a group of websites that they own to their main websites.
- A DNS CNAME is also used to point multiple different hostnames for different services to the parent domain.
- You can use a DNS CNAME record to create a subdomain for every customer on your domain.
- You can also use a DNS CNAME record to point the customer subdomains to their root domains.
- Can be used to point different versions of your website to your main domain.