How to add records

After defining your Edge DNS main settings, you can add records to specify which IPs are associated with the domain and how Edge DNS should handle requests for the domain.


  1. Access Azion Console > Edge DNS.
  2. From the list, choose the Edge DNS in which you want to add records.
  3. Select the Records tab.
  4. Click the Add Record button.
  5. In Name, provide the new record’s name. Depending on the type of record you want to use, there may exist specific formats and recommendations. For example: for a CNAME record, you can use the name www.
  6. In Type, select the type of record you want to add. Accepts the types A, AAAA, ANAME, CAA, CNAME, DS, MX, NS, PTR, SRV, and TXT.
  7. In Value, add the items for the DNS response to the registered record. The accepted values vary according to the chosen type of record.
  8. In TTL (seconds), choose the time, in seconds, that a response can be cached on a resolver server. Maximum value: 2147483647.
  9. In Policy, select between Simple or Weighted.
  10. If you select Weighted in Policy:
    • In Weight, specify the weight for each record. Accepts values from 0 to 255.
    • In Description (optional), you can describe, for example, the distinction between records with the same Name and Type. Accepts up to 45 characters.
  11. Click the Save button.

  1. Run the following GET request in your terminal, replacing [TOKEN VALUE] with your personal token to retrieve your <hosted_zone_id>:
Terminal window
curl --location 'https://api.azionapi.net/intelligent_dns' \
--header 'Authorization: Token [TOKEN VALUE]' \
--header 'Accept: application/json; version=3'
  1. You’ll receive a response with all your existing edge firewalls. Copy the value of the <id> that you want to use.
  2. Run the following POST request, replacing [TOKEN VALUE] with your personal token and the <hosted_zone_id> value you copied:
Terminal window
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": [
"www.mydomain.com"
],
"ttl": 20,
"description": "description"
}'
  1. You’ll receive a response similar to this:
{
"results": {
"answers_list": [
"www.mydomain.com"
],
"zone_id": 1234,
"record_type": "CNAME",
"ttl": 20,
"policy": "simple",
"entry": "www",
"id": 12345,
"description": "description"
},
"schema_version": 3
}

Wait a few minutes for the changes to propagate and your records will be created in the hosted zone you chose.




Contributors