DNS Records
After adding your domain in the Arvancloud panel, you need to move your domain's DNS records to the Arvancloud panel to activate Arvancloud DNS and CDN services on it. To do this, you can move the records manually from your previous provider to the Arvancloud panel using their types and values, or import your DNS Zone File into the panel. This guide covers how to move records from control panels such as cPanel and DirectAdmin, as well as how to import a DNS Zone File.
Moving DNS Records from cPanel to the Arvancloud Panel
If you use cPanel, to get all of your site's DNS records, go to the cPanel management panel and click Zone Editor.
Next, if you have more than one domain registered in cPanel, enter your domain name in the Domain field.
After finding your domain, set the filter to All so all of its records are shown.
Every record shown in this section for your domain must also be defined in the Arvancloud panel, under CDN > DNS Records.
Moving DNS Records from DirectAdmin to the Arvancloud Panel
If you use DirectAdmin, to get all of your site's DNS records, go to the DirectAdmin management panel and click DNS Management.
On the new page that opens, all DNS records of your domain are shown.
Every record shown in this section for your domain must also be defined in the Arvancloud panel, under CDN > DNS Records.
How to Upload a DNS Zone File to the Arvancloud Panel
In the hierarchical structure of DNS, each zone specifies who manages a domain and its related subdomains. So, when a domain is created, a zone is also created for it. The details of the records of the domains in a zone are stored in the DNS Zone File, which is a simple text file.
When you change DNS servers, your domain's DNS records must be moved from the previous DNS server to the new one. One way to do this is to move the domain's DNS records manually from the previous DNS server to the new one. But an easier, faster, and more reliable way is to upload the DNS Zone File and move all records to the new DNS server at once.
If you use Arvancloud Cloud DNS, you can upload your DNS Zone File in the Arvancloud panel to move all DNS records of your domain directly from your previous DNS server to Arvancloud's DNS servers.
Before doing this, however, you need to get your domain's DNS Zone File. DNS service providers usually provide ways to get this file. Alternatively, if your DNS server is BIND, you can find this file in a file named named.conf.
Notes About the DNS Zone File
- Make sure the DNS Zone File you want to upload is in the standard BIND format.
- In this file, the TTL set for a record is supported as defined. But if no TTL is set for a record, the default value of 120 seconds is set for it.
- If the uploaded DNS Zone File contains the $ORIGIN directive, it is ignored.
- If the uploaded DNS Zone File uses the $INCLUDE and $GENERATE directives, they are ignored.
- Only A, AAAA, CAA, CNAME, MX, NS, SOA, SRV, PTR, and TXT records are supported in the uploaded DNS Zone File.
- If the uploaded DNS Zone File contains an SOA record, it is ignored, and a new SOA record is set by Arvancloud.
- If the uploaded DNS Zone File contains NS records, they are ignored, and Arvancloud NS records are registered instead.
Steps to Upload the DNS Zone File in the Arvancloud Panel
To upload the DNS Zone File in the panel, go to CDN and click DNS Records in the side menu.
In the window that opens, click Import DNS. This opens a window where you can select the domain's DNS Zone File that you previously saved on your computer.
In this window, find and select your file from the location where you saved it. Finally, after selecting the file, click Open. The domain's DNS Zone File is uploaded, and your domain's DNS records are added to the Arvancloud panel.
To upload the Zone File via API, you can use the following sample request:
curl --request POST \
--url https://napi.arvancloud.ir/cdn/4.0/domains/example.com/dns-records/import \
--header 'Accept: application/json' \
--header 'Authorization: API KEY 1 2 3 4' \
--header 'content-type: multipart/form-data' \
--form f_zone_file=@/path/to/txt/file.txt