Migrate nameservers to Azion
Move the DNS of a domain to Edge DNS, test the zone, delegate the domain to Azion's nameservers, and point its hostnames at a domain.
You can migrate the nameservers of a domain to Edge DNS from Azion Console, the Azion CLI, or the Azion API. Afterward, Azion’s nameservers answer every DNS query for the domain, and you manage its records at Azion instead of at your current provider.
The order of the work matters. Resolvers ask Azion only after your registrar delegates the domain, and they get NXDOMAIN for every name the zone does not hold. So you rebuild and test the zone first, and change the registrar last. Edge DNS hosts the zone, and a domain serves your application on the hostnames whose records point at it.
Prerequisites
Console
- A domain you control, access to its registrar, and the list of records your current DNS provider serves for it.
- The Edit DNS permission, which requires View DNS. Refer to Teams permissions.
- A domain in Domains that serves your application.
digon your machine, for stages 3 and 6. To install it, refer to Query a zone with dig.- Access to Azion Console. To sign in, refer to Access Azion Console.
1. Create the zone of the domain
Edge DNS keeps the records of one domain in a zone. Use your domain in place of example.com throughout this guide.
Console
To create the zone in Azion Console:
Access Azion Console > Edge DNS.
In the General section, enter a Name that identifies the zone in lists, such as example-zone.
In the Domain Name section, enter the root domain you migrate in Domain Name, such as example.com.
In the Status section, leave Active on.
The Console shows Your DNS zone has been created. To complete the setup, ensure the Azion nameservers are configured in your domain provider. and opens the Records tab of the zone. Stage 4 covers the nameservers.
The domain of a zone cannot change, and only one zone in Azion can host a domain. For every zone setting, refer to Create, edit, or delete a zone.
2. Copy the records of the domain
The zone answers only for the records you add to it. Export or list the records at your current DNS provider, then recreate them in Edge DNS before the registrar changes.
To copy the records:
- Leave out the NS and SOA records of the root domain. Edge DNS answers both for the zone itself.
- Add every other record to the zone with the same name, type, and value. For the steps in each interface, refer to Add, edit, or delete a record.
- Enter each name relative to the zone:
wwwforwww.example.com, and@forexample.comitself. Edge DNS adds the domain, so a name typed with the domain is served with the domain twice.
The zone now holds every name your domain answers for. For the value format of each record type, refer to Record types.
A CNAME record is refused at @. If your current provider points the root domain at another hostname, use an ANAME record, as Point an apex domain with ANAME shows.
3. Test the zone at Azion’s nameservers
Query Azion’s nameserver directly before you touch the registrar. The query skips your resolver’s cache, so it shows what Edge DNS answers for the zone today.
Wait about a minute after you save a record before you query its name.
To test a record, query ns1.aziondns.net for one of the names you added:
The nameserver returns the value of the record:
Run the same query for each name and type you copied, and compare each answer with your current provider. Without +short, the output header shows status: NOERROR and the aa flag, which marks an authoritative answer.
A new zone and its records can take about a minute to be answered. If a query prints nothing, refer to A new record returns NXDOMAIN.
To see the nameservers the zone declares for itself, query its NS set:
The zone lists the three Edge DNS nameservers:
The zone answers as your current provider does. The domain is ready to move.
4. Delegate the domain to Azion’s nameservers
Your registrar tells resolvers which nameservers answer for the domain. Replacing the current nameservers with Azion’s moves every query for the domain to Edge DNS.
Get the three nameservers from the interface you used in stage 1:
Console
On the Zones page of Edge DNS, select Copy Nameserver Values. It copies the three names, joined by semicolons.
If the domain has a DS record from your current provider, remove it at your registrar first. Wait for it to expire from resolver caches before you change the nameservers. With the old DS record in place, validating resolvers can reject the answers of Edge DNS.
To delegate the domain at your registrar:
- Open the nameserver settings of the domain at your registrar.
- Replace the current nameservers with all three Edge DNS nameservers:
ns1.aziondns.net,ns2.aziondns.com, andns3.aziondns.org. - Save the change.
The registrar lists the three Edge DNS nameservers for the domain. Stage 6 checks when resolvers follow them.
If DNSSEC is on for the zone, add its four DS values at the registrar only after the delegation. For the steps, refer to Add the DS record at your registrar.
5. Point the hostnames to the domain
A domain serves your application on the hostnames in its CNAME field. You add each hostname of your domain to that field, then create a CNAME record in the zone that points the hostname at the Azion address of the domain.
Console
To list the hostnames on the domain in Azion Console:
Access Azion Console > Domains > the domain of your application.
In the CNAME field, add the hostnames that belong to your zone. If the field already holds values, keep them.
Select Save, and copy the Azion address of the domain, in the form xxxxxxxxxx.map.azionedge.net.
To create the record in the zone:
Access Azion Console > Edge DNS.
On the Zones page, select the zone, then select the Records tab.
In Name, enter the hostname relative to the zone, such as www. Enter * for every name the zone does not list. The domain serves only the hostnames it lists, so add each of them to its CNAME field too. The Console adds the domain for you.
In Record Type, select CNAME - Canonical name.
In Value, enter the Azion address of the domain, such as xxxxxxxxxx.map.azionedge.net.
Change TTL (seconds) and Policy Type if your record needs other values.
The Console shows Edge DNS Record has been created. Repeat the record steps for each hostname the domain serves.
A record named * answers every name the zone does not list, so one record can send both www and blog to the domain. The domain serves only the hostnames in its CNAME field, so add each subdomain, such as blog.example.com, to it as well, or list a wildcard such as *.example.com. For the names a wildcard record matches, refer to Match subdomains with a wildcard record.
A new record can take about a minute to answer on every nameserver. A change to an existing record can take a few minutes. For the reason, refer to How Edge DNS works.
6. Check the domain through a public resolver
A public resolver reaches Azion only through the delegation your registrar publishes. Querying one shows whether the internet already follows the change from stage 4.
Wait about a minute after you save the last record of stage 5 before you query its name.
To query a public resolver, run:
While the resolver does not follow the delegation yet, the header can read NXDOMAIN with no answer:
The resolver may also return the records of your previous provider. Once it follows the delegation, it returns the same value that ns1.aziondns.net returned in stage 3. If it does not, refer to Public resolvers return NXDOMAIN while Azion’s nameservers answer.
Edge DNS now answers for your domain. From here on, you add and change its records in Edge DNS, not at your previous provider.