Point a subdomain with a CNAME record
Make a subdomain an alias of another hostname with an Edge DNS CNAME record, from Azion Console, the Azion CLI, or the API, and check the answer.
You can point a subdomain to another host with a CNAME record in Edge DNS from Azion Console, the Azion CLI, or the Azion API. The record below makes blog.example.com an alias of www.example.com, so a query for blog gets the address of www. A CNAME cannot be named @: to point the root domain, refer to Point an apex domain with ANAME instead.
Prerequisites
Console
- A zone for your domain in Edge DNS. To create one, refer to Create, edit, or delete a zone.
- The hostname the alias points to. This example uses
www.example.com, an A record onwwwin the same zone that answers192.0.2.1. - The Edit Edge DNS permission. It requires View Edge DNS. Refer to Teams permissions.
- Access to Azion Console. To sign in, refer to Access Azion Console.
Add the CNAME record
The record name is relative to the zone: you enter blog, and Edge DNS serves it as blog.example.com. The value is the one hostname the alias points to. Replace example.com with your domain in every step.
Console
To add the CNAME record in Azion Console:
Access Azion Console > Edge DNS.
On the Zones page, select the row of the zone.
The Create Record drawer opens.
In Name, enter blog. The Console shows your domain after the field and adds it for you.
In Record Type, select CNAME - Canonical name.
Keep TTL (seconds) at 3600.
In Value, enter www.example.com.
The Console shows Edge DNS Record has been created, and blog appears in the Records table.
Once blog holds the CNAME, it holds no other record type: Edge DNS refuses an MX or CAA record on blog with 19018. For every CNAME rule and its error, refer to Record types.
Check the answer
Ask Azion’s nameserver directly, without your resolver’s cache. This check works before you delegate the domain to Azion.
To query ns1.aziondns.net for the alias, replace example.com with your domain:
The nameserver returns the target hostname, then the address of the target:
The target is in the same zone, so Edge DNS answers the CNAME and the A record of www in one response. A name that nobody queried before you saved it answers within seconds. A later change to the record can take a few minutes to reach every nameserver. For how answers are cached, refer to How Edge DNS works.
If the command prints nothing, refer to A new record returns NXDOMAIN.