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 workload.
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 workload serves your application on the hostnames whose records point at it.
To point one hostname at a workload while your current provider keeps the DNS of the domain, refer to Point a domain to a workload instead.
Prerequisites
Console
- A domain you control, access to its registrar, and the list of records your current DNS provider serves for it.
- The Edit Edge DNS permission, which requires View Edge DNS. Refer to Teams permissions.
- A workload that serves your application. To create one, refer to the Workloads quickstart.
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, and the API refuses an NS record at
@with19021. - 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 @ with 19005. 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.
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.
The first record of a zone can take a few minutes 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.
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 your registrar holds a DS record for the domain from your current provider, validating resolvers can reject the answers of Edge DNS. To fix it, refer to Validation fails after turning on DNSSEC.
5. Point the hostnames to the workload
A workload serves your application on the hostnames you add to it. You add each hostname of your domain to the workload, then create a CNAME record in the zone that points the hostname at the Azion domain of the workload.
Workloads replaces Domains. If your account still serves applications through Domains, follow the Domains steps in the Console panel or the API v3 steps in the API panel. For how a workload takes a hostname, refer to Workloads settings and Point a domain to a workload.
Console
To point a hostname at a workload in Azion Console:
Access Azion Console > Workloads.
Select the workload that serves your application.
In the Subdomain and Domain fields, add the hostnames of your domain. If the workload already lists them, keep them at hand.
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 Console adds the domain for you.
In Record Type, select CNAME - Canonical name.
In Value, enter the Azion domain of the workload, such as <your-workload>.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 workload serves.
If your account uses Domains, add the hostnames there instead of on a workload:
Access Azion Console > Domains.
Select the domain that serves your application.
In the CNAME field, add the hostnames of your domain. If the domain already lists them, keep them at hand.
Then create each CNAME record in Edge DNS with the steps above, and enter the Azion domain of the domain in Value.
A record named * answers every name the zone does not list, so one record can send both www and blog to the workload. For the names a wildcard matches, refer to Match subdomains with a wildcard record.
A record whose name nobody queried before it existed answers within seconds. A change to an existing record can take a few minutes to reach every nameserver. 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.
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.
Point the hostnames to a v3 domain
An account that runs on API v3 has Domains in place of workloads, and lists the hostnames in the CNAME field of the domain. To find out which model your account runs on, refer to Verify your account migration.
Only this step changes. The zone, its records, the test against Azion’s nameservers, the delegation, and the check through a public resolver are the same on both models.
To list the hostnames and create the record 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.
Go to Edge DNS, select the zone, open the Records tab, and select + Record. In Name, enter the hostname or *. In Record Type, select CNAME - Canonical name. In Value, enter the Azion address of the domain. Set TTL (seconds) and Policy, and select Save.