Adding an ANAME (Alias) Record
An ANAME record (also known as an ALIAS record or CNAME flattening) automatically finds and updates A and AAAA records from the target. Unlike CNAME records, ANAME/ALIAS records can be placed next to other records (one per hostname), making them ideal for use at the zone apex (bare domain).
This is particularly useful when you need CNAME-like functionality on your bare domain (e.g., example.com instead of www.example.com), which is not possible with a standard CNAME record.
Example ANAME Record
| Type | Host | Answer | TTL |
|---|---|---|---|
| ANAME | example.com | myapp.herokuapp.com | 300 |
Note: ANAME/ALIAS records are not a universal DNS standard. Availability depends on your DNS provider. To set up DNS records through your registrar, you need to be using their nameservers so they can manage and host your DNS.
Steps to Add an ANAME Record
- Log in to your domain registrar account.
- Navigate to your domains list.
- Click on the domain name you wish to create an ANAME record for.
- Click Manage DNS Records.
- Here you will add the desired ANAME record, provided by your host:
- Select ANAME (or ALIAS) in the Type drop-down menu.
- Enter the subdomain in the Host field (or leave blank for the bare domain).
- Enter the domain/value in the Answer field.
- Enter the desired TTL, or just leave it at 300 (default).
- Click the Add Record button.
Once the records are created, the domain should be working within 24 hours.
When to Use ANAME vs CNAME
| Feature | CNAME | ANAME/ALIAS |
|---|---|---|
| Can be used at zone apex (bare domain) | No | Yes |
| Can coexist with other record types | No | Yes |
| Standard DNS record type | Yes | No (provider-specific) |
| Resolves to | Another domain name | IP address (resolved from target) |