When do I use an ALIAS record?¶
You will use an ALIAS record when you want the domain itself (not as subdomain) to “point” to a hostname.
This is useful, just like with CNAME records, if you want to point to a hostname instead of an IP address.
Since it is not possible to use a CNAME record on just the bare domain (“example.com”), the “ALIAS” record type is a solution to that problem.
When using an ALIAS record, please note that:
- There can not already be an A or AAAA record on the bare domain (@)
- An ALIAS record will break DNSSEC on the bare domain (@), because @ A and @ AAAA responses will be missing the RRSIG records, which will break resolution on all resolvers.
Can I have an example?¶
Here is an example:
@ 10800 IN ALIAS example.example.com.
Please note the final dot (.) at the end is necessary for the record to work correctly.