Domain
The first step to activating the CDN service is adding your domain in the Arvancloud panel. This guide walks you step by step through adding a domain in your panel.
After signing up and logging in to the panel, click the CDN product, and on the page that opens, select Add New Domain.
In the window that opens, if you want to add your domain to Arvancloud, enter your site's address without www in the field; if you want to move only one subdomain's traffic to Arvancloud using CNAME Setup, enter the subdomain name.
After reading the terms of service in full, click Continue and Accept Terms.
After adding the domain and clicking Continue, if you added a subdomain, you are asked to choose the traffic transfer method from NS Delegation and CNAME Setup.
If you want to add your domain to Arvancloud via API instead of the panel, use the following sample requests:
With NS Delegation:
curl --location 'https://napi.arvancloud.ir/cdn/4.0/domains/dns-service' \
--header 'authority: napi.arvancloud.ir' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: API KEY 1 2 3 4' \
--header 'cache-control: no-cache' \
--header 'content-type: application/json' \
--data '{"domain":"arvandocs.ir","domain_type":"full"}'
With CNAME Setup:
curl --location 'https://napi.arvancloud.ir/cdn/4.0/domains/dns-service' \
--header 'authority: napi.arvancloud.ir' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: API KEY 1 2 3 4' \
--header 'cache-control: no-cache' \
--header 'content-type: application/json' \
--data '{"domain":"cname.arvandocs.ir","domain_type":"partial","plan_level":2}'
Your DNS records are then automatically moved to the Arvancloud panel.
In the next step, you need to choose a plan for your domain. To check CDN pricing, see this page.
To choose the domain plan via API, you can use the following sample request:
In this request, assign the value 1 for the Basic plan, 2 for Growth, and 3 for Professional to the plan_level key.
curl --location --request PUT 'https://napi.arvancloud.ir/cdn/4.0/domains/arvandocs.com/plan' \
--header 'DNT: 1' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'authorization: API KEY 1 2 3 4' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json, text/plain, */*' \
--data '{"plan_level":"2"}'
In the next step, a page shows your domain's records. Check these records and their IPs, and if there is no problem, click Continue.
In this section, you can copy the settings of the new domain from another domain you previously added to your account, or import the domain's Zone File.
Be sure to check the values of the A records. These values must be the IP address of the origin server hosting your site.
To copy domain settings via API, you can use the following sample request:
curl --request POST \
--url https://napi.arvancloud.ir/cdn/4.0/domains/arvantest.ir/clone \
--header 'Accept: application/json' \
--header 'Authorization: Apikey 1 2 3 4' \
--header 'Content-Type: application/json' \
--data '{
"from": "string"}'
Next, if you chose NS Delegation to transfer your domain's traffic, you need to change your NSs to Arvancloud's NSs.
Note that before changing these records to the NS records assigned by Arvancloud, you must first define all records related to your domain in the DNS Records section of the CDN product in the panel.
To do this, you can upload your DNS Zone File directly.
Also, if you used CNAME Setup to move a subdomain's traffic to Arvancloud, you need to enter the CNAME record provided in the panel in your DNS service.
Note that, depending on the domain's registrar, domain activation on Arvancloud may take up to 24 hours.
To check your domain settings, you can use the dig command or the NSLookup website.