The CNAME record type

The CNAME (canonical name) record type aliases one domain to another.

Limitations of CNAME aliasing

Because the CNAME record works at the domain-name level, rather than the website level, it is only possible to alias one domain to another: you cannot necessarily alias one website to another.

For example, if your website is hosted at “”, and you want to also make it available at “”, you could CNAME one domain to another, and both would have your website on them. However, if your website was only available by going to “”, then you cannot make the alias — there’s no way to add the “/mysite” path.


Here, we query for CNAME records of the domain “”. The result is a record pointing to another domain.

$ dog CNAME
CNAME 1h00m00s   ""

Use in A record queries

It’s possible for a CNAME record to be returned as the response to an A or an AAAA query, followed by the IPv4 or IPv6 address of the domain specified in the CNAME record.

$ dog A
CNAME 1h00m00s   ""
    A           1h00m00s