- Published on
What is an ANAME record?
- Authors
- Name
- Skip2 Networks
- Title
- Content Manager
ANAME (Alias) DNS Records
ANAME records, often referred to as "Alias records," are a proprietary DNS record type primarily used by some DNS providers, notably within the CDN industry, to provide CNAME-like functionality at the apex of a domain (e.g., example.com
instead of www.example.com
). Traditionally, the root or apex of a domain cannot be a CNAME record because of how DNS resolution works and the conflicting requirements for other essential records like SOA and NS records. This limitation poses a challenge when customers want their root domain to point to a CDN or a cloud service that provides a hostname (like cdn.example.net
) rather than a static IP address.
ANAME records solve this problem by allowing the apex domain to point to another hostname. When a DNS resolver queries for an ANAME record, the authoritative DNS server for that domain resolves the target hostname (e.g., cdn.example.net
) to its IP address(es) at the time of the request and then returns those IP addresses as if they were A or AAAA records for the original apex domain. This dynamic resolution means that if the IP address of the CDN (or other service) changes, the ANAME record automatically reflects the new IP without requiring manual updates to the customer's DNS zone, providing flexibility and ease of management, especially for CDN integrations.
Example
A customer wants their root domain mycompany.com
to point to their CDN provider's hostname customer.cdnprovider.net
.
Using an ANAME record, their DNS configuration might look something like this:
mycompany.com. IN ANAME customer.cdnprovider.net.
When a user's browser looks up mycompany.com
, the DNS server for mycompany.com
sees the ANAME record. It then performs a lookup for customer.cdnprovider.net
(which might be 192.0.2.5
or 2001:db8::123
at that moment) and returns the resolved IP address(es) to the user's browser as if they were A/AAAA records for mycompany.com
. If customer.cdnprovider.net
's IP address changes, the ANAME record automatically updates the returned IP, keeping mycompany.com
pointed correctly without manual intervention.