Point an apex domain with ANAME
Point your apex domain, such as example.com, at an Azion hostname with an Edge DNS ANAME record from Azion Console, the Azion CLI, or the API.
You can point an apex domain at an Azion hostname with an ANAME record in Edge DNS from Azion Console, the Azion CLI, or the Azion API. Edge DNS then answers queries for the apex with the addresses of that hostname. To point a subdomain such as www, refer to Point a subdomain with a CNAME record instead.
The apex, also called the root or naked domain, is your domain with no subdomain, such as example.com. A CNAME record cannot sit at the apex, so the ANAME record takes its place there. For the reason, refer to How Edge DNS works.
Select your interface once. The prerequisites and the first task show only that path.
Prerequisites
- A zone for your domain in Edge DNS. To create one, refer to Create, edit, or delete a zone.
- The Edit Edge DNS permission, which requires View Edge DNS. Refer to Teams permissions.
- The Azion hostname the record points at, such as the workload domain
<your-workload>.map.azionedge.net. To find it and make the workload accept your apex domain, refer to Point a domain to a workload.
- Access to Azion Console. To sign in, refer to Access Azion Console.
Add the ANAME record at the apex
The record name @ stands for the apex. The value is a hostname under azioncdn.net, azionedge.net, or azionedge.com, and the TTL is always 20. To edit or delete the record later, refer to Add, edit, or delete a record.
To add the record with the Azion CLI, replace <zone-id> with the ID of your zone and the value with your hostname:
The command prints the ID of the record:
The zone holds the ANAME record at the apex. In --name, @ stands for the domain: never type the domain itself.
The API refuses an ANAME record with any TTL other than 20 with 19011, and a hostname outside the three Azion domains with 19016. For every rule of the type, refer to Record types.
Query the apex at Azion’s nameservers
Ask Azion’s nameserver directly, without your resolver’s cache, to confirm that it answers for the apex. This check works before your registrar delegates the domain to Azion.
To query ns1.aziondns.net for the apex, replace example.com with your domain:
The nameserver returns the addresses of the hostname, one per line:
Edge DNS looks up the hostname itself and answers the apex with its addresses as A records. Without +short, the output shows status: NOERROR, the aa flag, a TTL of 20 on each A record, and no CNAME in the answer.
If the command prints nothing, wait a few minutes and run it again. After you add or change a record, it can take a few minutes to reach every nameserver. For more information, refer to How Edge DNS works.
Resolvers on the internet use the record only once your registrar delegates the domain to the three Edge DNS nameservers. For the delegation, refer to Migrate nameservers to Azion.