How to migrate nameservers to Azion
Azion allows you to host and manage DNS zones and records by redirecting the DNS resolution of your domain provider to Azion’s authoritative nameservers (NS) through Edge DNS.
Step 1: Create a DNS zone
To create a DNS zone for a domain entry yourdomain.org:
- Access Azion Console > Edge DNS.
- Click the + Zone button.
- Give your zone an easy-to-remember name.
- Indicate the FQDN as recorded in the DNS. Example:
yourdomain.org. - Click the Save button.
To get the Azion nameservers:
- Click the Copy Nameserver Values button to get the Azion’s nameservers:
ns1.aziondns.netns2.aziondns.comns3.aziondns.org
- Keep these values in hand for when you redirect the authoritative nameservers of your domain.
- Run the following
POSTrequest in your terminal, replacing[TOKEN VALUE]with your personal token and adding your domain address in thedomainfield:
curl --request POST --url https://api.azion.com/v4/edge_dns/zones --header 'Accept: application/json' --header 'Authorization: Token [TOKEN VALUE]' --header 'Content-Type: application/json' --data '{"name": "MY dns Zone","domain": "yourdomain.com","active": true}'| Key | Description |
|---|---|
name | Sets the string in the value as a name of the zone entry with Azion. |
domain | Sets the apex domain. |
active | When true, activates the zone. |
- You’ll receive a response similar to this:
{ "results": [ { "nx_ttl": 3600, "domain": "yourdomain.com", "retry": 7200, "name": "yourdomain.com", "nameservers": [ "ns1.aziondns.net", "ns2.aziondns.com", "ns3.aziondns.org" ], "soa_ttl": 3600, "is_active": true, "refresh": 43200, "expiry": 1209600, "id": <hosted_zone_id> } ]}- Copy the values inside the
nameserversfield. These values will be used to redirect the authoritative nameservers of your domain. - Copy the
idvalue for when you associate an application to your zone.
Step 2: Redirect authoritative nameservers
The next step is to redirect your domain’s authoritative nameservers, and for this, you’ll need to access your domain provider and modify your NS records. Here are some of the most popular domain providers and how they handle DNS nameserver changes:
Azion recommends that you add all of the three available Azion nameservers for additional reliability:
ns1.aziondns.netns2.aziondns.comns3.aziondns.org
Once your nameserver records have been updated to Azion’s addresses, you’ll be able to create records directly from Azion. See the next section for an example on how to do that.
Step 3: Create application record in DNS zone
After you’ve successfully migrated your DNS zone to Azion, you won’t need to access your domain provider to create new records, since you can do that directly with Azion. This means you can launch your application with it’s custom domain and easily create new applications and records as needed.
To associate a new application to your domain, you’ll need to create a new CNAME record in your zone and associate it to an application.
To customize the domain of your application under your new zone, you need to associate the CNAME of your application to a new record. Retrieve the custom domains listed for the application by following the steps:
- Access Azion Console > Workloads.
- Click the domain you want to associate your custom domain to.
- In the Subdomain and Domain fields, add the custom domains for the application that should be under your DNS zone. If you already added a custom domain, copy those values and keep them in hand.
Now you’ll need to navigate to the Edge DNS area to add a record for your application’s CNAMEs:
- On the upper-left corner of the page, open the Products menu, represented by three horizontal lines, and then select Edge DNS.
- Select the DNS zone.
- Navigate to the Records tab.
- Click the + Record button.
- Under Name, use a hostname or subdomain. For example:
*. - Under Record Type, select
CNAME - Canonical name. - Under Value, enter the Azion domain address in FQDN format. Example:
xxxxxxxxxx.map.azionedge.net. - Set the TTL and Policy as desired.
- Click the Save button.
Repeat the process described above for every CNAME listed for your application. Wait a couple of minutes for the changes to propagate. You can run the DIG command in your terminal to check whether your domain points to the Azion address.
- Access Azion Console > Domains.
- Click the domain you want to associate your custom domain to.
- In the CNAME field, add the custom domains for the application that should be under your DNS zone. If you already added a custom domain, copy those values and keep them in hand.
Now you’ll need to navigate to the Edge DNS area to add a record for your application’s CNAMEs:
- On the upper-left corner of the page, open the Products menu, represented by three horizontal lines, and then select Edge DNS.
- Select the DNS zone.
- Navigate to the Records tab.
- Click the + Record button.
- Under Name, use a hostname or subdomain. For example:
*. - Under Record Type, select
CNAME - Canonical name. - Under Value, enter the Azion domain address in FQDN format. Example:
xxxxxxxxxx.map.azionedge.net. - Set the TTL and Policy as desired.
- Click the Save button.
Repeat the process described above for every CNAME listed for your application. Wait a couple of minutes for the changes to propagate. You can run the DIG command in your terminal to check whether your domain points to the Azion address.
- Run the following
GETrequest to retrieve your domain’s ID, replacingTOKEN VALUEwith your personal token:
curl --location 'https://api.azionapi.net/domains' --header 'Accept: application/json; version=3' --header 'Authorization: Token [TOKEN VALUE]'- You’ll receive a response similar to this:
{ ... "results": [ { "id": <domain_id>, "name": "yourdomain.com CA1 DC-yourdomain.com", "cnames": [], "cname_access_only": true, "digital_certificate_id": <digital_certificate_id>, "edge_application_id": <edge_application_id>, "is_active": true, "domain_name": "xxxxxxxxxx.map.azionedge.net" } ]}- Locate the domain you wish to link to the custom domain and copy the
domain_idvalue received in the response. - If you have no CNAMEs listed, run a
PATCHrequest, adding thedomain_idas a path, to update thecnamesfield with the domains you wish to configure:
curl --location --request PATCH 'https://api.azionapi.net/domains/<domain_id>' --header 'Accept: application/json; version=3' --header 'Authorization: Token [TOKEN VALUE]' --header 'Content-Type: application/json' --data '{ "cnames": [ "yourdomain.com", "*.yourdomain.com" ]}'| Key | Description |
|---|---|
cnames | Accepts a list of CNAMEs for the domains as values. For example, ["*.yourdomain.com", "blog.yourdomain.com"]. |
- Run a new
GETrequest to retrieve thehosted_zone_id, which indicates the DNS zone you created:
{ ... "results": [ { "domain": "yourdomain.com - zone", "is_active": true, "name": "yourdomain.com", "id": <hosted_zone_id> } ]}- Run the following
POSTrequest in your terminal, replacing[TOKEN VALUE]with your personal token,hosted_zone_idwith the value from the previous response and the answers list with the Azion domain address as a string:
curl --location 'https://api.azionapi.net/intelligent_dns/<hosted_zone_id>/records' --header 'Content-Type: application/json' --header 'Authorization: Token [TOKEN VALUE]' --header 'Accept: application/json; version=3' --data-raw '{ "record_type": "CNAME", "entry": "www", "answers_list": [ "xxxxxxxxxx.map.azionedge.net" ], "description": "www record", "ttl": 20}'| Key | Description |
|---|---|
record_type | The type of record being created. See a full list of accepted record types in the Edge DNS documentation. |
entry | Sets the value of the entry, appending it to the apex domain from the zone to generate the record. For example, the value www will represent a record for www.yourdomain.com. Accepts the wildcard (*) notation. |
answers_list | Accepts a list of CNAMEs for the domains as values. In the example described above, the CNAME is the Azion address. |
description | Sets the string as a record description. |
ttl | Accepts a list of CNAMEs for the domains as values. For example, ["www.yourdomain.com", "blog.yourdomain.com"]. |
- You’ll receive a reponse confirming that the new record was created:
{ "results": { "answers_list": [ "xxxxxxxxxx.map.azionedge.net" ], "zone_id": <hosted_zone_id>, "record_type": "CNAME", "ttl": 20, "policy": "simple", "entry": "www", "id": <record_id>, "description": "www record" }}- Wait a couple of minutes for the changes to propagate. You can run the DIG command in your terminal to check whether your domain points to the Azion address.
- Run the following
GETrequest to retrieve your workloads’s ID, replacingTOKEN VALUEwith your personal token:
curl --request GET --url https://api.azion.com/v4/workspace/workloads --header 'Accept: application/json' --header 'Authorization: Token [TOKEN VALUE]'- You’ll receive a response similar to this:
{"count": 3,"results": [ { "id": "<workload_id>"", "name": "My workload", "active": true, "last_editor": "your-email.example.com", "last_modified": "2025-08-06T17:53:47.460211Z", "infrastructure": 1, "tls": { "certificate": null, "ciphers": 7, "minimum_version": "tls_1_3" }, "protocols": { "http": { "versions": [ "http1", "http2" ], "http_ports": [ 80 ], "https_ports": [ 443 ], "quic_ports": null } }, "mtls": { "verification": null, "certificate": null, "crl": null }, "domains": [ "xxxxxxx.azion.app" ], "workload_domain_allow_access": false, "workload_domain": "xxxxxxxx.map.azionedge.net", "product_version": "1.0" },- Locate the domain you wish to link to the custom domain and copy the
domain_idvalue received in the response. - If you have no CNAMEs listed, run a
PATCHrequest, adding thedomain_idas a path, to update thecnamesfield with the domains you wish to configure:
curl --request PATCH --url https://api.azion.com/v4/workspace/workloads/<workload_id> --header 'Accept: application/json' --header 'Authorization: Token [TOKEN VALUE]' --header 'Content-Type: application/json' --data '{ "domains": [ "yourdomain.com", "*.yourdomain.com" ]}'| Key | Description |
|---|---|
domains | Accepts a list of CNAMEs for the domains as values. For example, ["*.yourdomain.com", "blog.yourdomain.com"]. |
- Run a new
GETrequest to retrieve thehosted_zone_id, which indicates the DNS zone you created:
{ ... "results": [ { "domain": "yourdomain.com - zone", "is_active": true, "name": "yourdomain.com", "id": <hosted_zone_id> } ]}- Run the following
POSTrequest in your terminal, replacing[TOKEN VALUE]with your personal token,hosted_zone_idwith the value from the previous response and the answer’s list with the Azion domain address as a string:
curl --request POST --url https://api.azion.com/v4/edge_dns/zones/<hosted_zone_id>/records --header 'Accept: application/json' --header 'Authorization: Token [TOKEN VALUE]' --header 'Content-Type: application/json' --data '{ "type": "CNAME", "name": "www", "rdata": ["xxxxxxxxxx.map.azionedge.net"], "ttl": 20, "description": "www record"}'| Key | Description |
|---|---|
record_type | The type of record being created. See a full list of accepted record types in the Edge DNS documentation. |
entry | Sets the value of the entry, appending it to the apex domain from the zone to generate the record. For example, the value www will represent a record for www.yourdomain.com. Accepts the wildcard (*) notation. |
rdata | Accepts a list of CNAMEs values for the domains. In the example described above, the CNAME is the Azion address. |
description | Sets the string as a record description. |
ttl | Accepts a list of CNAMEs values for the domains. For example, ["www.yourdomain.com", "blog.yourdomain.com"]. |
- You’ll receive a reponse confirming that the new record was created:
{ "results": { "rdata": [ "xxxxxxxxxx.map.azionedge.net" ], "zone_id": <hosted_zone_id>, "record_type": "CNAME", "ttl": 20, "policy": "simple", "entry": "www", "id": <record_id>, "description": "www record" }}- Wait a couple of minutes for the changes to propagate. You can run the DIG command in your terminal to check whether your domain points to the Azion address.
Additional resources
These guides might be helpful.
Advanced configurations:
Troubleshooting: