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.net
ns2.aziondns.com
ns3.aziondns.org
- Keep these values in hand for when you redirect the authoritative nameservers of your domain.
- Access Real-Time Manager (RTM).
- On the upper-left corner of the page, click the three horizontal lines to open the Products menu and select Edge DNS.
- Click the Add 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.
You’ll be redirected to your list of zones. To get the Azion nameservers:
- Click the zone you created.
- In the zone screen, under Nameservers, you’ll see Azion’s nameservers:
ns1.aziondns.net
ns2.aziondns.com
ns3.aziondns.org
- Keep these values in hand for when you redirect the authoritative nameservers of your domain.
- Run the following
POST
request in your terminal, replacing[TOKEN VALUE]
with your personal token and adding your domain address in thedomain
field:
curl --location 'https://api.azionapi.net/intelligent_dns' \
--header 'Authorization: Token [TOKEN VALUE]' \
--header 'Accept: application/json; version=3' \
--header 'Content-Type: application/json' \
--data '{ "name": "yourdomain.com", "domain": "yourdomain.com", "is_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. |
is_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": 3211 } ]
}
- Copy the values inside the
nameservers
field. These values will be used to redirect the authoritative nameservers of your domain. - Copy the
id
value 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.net
ns2.aziondns.com
ns3.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 edge 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 edge application to your domain, you’ll need to create a new CNAME record in your zone and associate it to an edge application.
To customize the domain of your edge application under your new zone, you need to associate the CNAME of your edge application to a new record. Retrieve the custom domains listed for the application by following the steps:
- 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 edge 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 Real-Time Manager (RTM).
- On the upper-left corner of the page, open the Products menu, represented by three horizontal lines, and then select 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 edge 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.
- Under Name, create a hostname or subdomain. For example:
*
. - Under 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
GET
request to retrieve your domain’s ID, replacingTOKEN VALUE
with your personal token:
- You’ll receive a response similar to this:
- Locate the domain you wish to link to the custom domain and copy the
domain_id
value received in the response. - If you have no CNAMEs listed, run a
PATCH
request, adding thedomain_id
as a path, to update thecnames
field with the domains you wish to configure:
Key | Description |
---|---|
cnames | Accepts a list of CNAMEs for the domains as values. For example, ["*.yourdomain.com", "blog.yourdomain.com"] . |
- Run a new
GET
request to retrieve thehosted_zone_id
, which indicates the DNS zone you created:
- Run the following
POST
request in your terminal, replacing[TOKEN VALUE]
with your personal token,hosted_zone_id
with the value from the previous response and the answers list with the Azion domain address as a string:
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:
- 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.