If you select CNAME for DNS setup when you add a website, you need to add a DNS record to map the domain that you want to proxy to the CNAME assigned by Edge Security Acceleration (ESA) . This way, user requests destined for your domain can be forwarded to ESA points of presence (POPs). This enables content delivery acceleration, edge computing, and enhanced protection.
Verify domain ownership
The first time you add a domain to DCDN, you must verify the ownership of the domain. Once the domain passes the verification, its subdomains do not require separate ownership verification.
Procedure
Add DNS records and enable proxy
You can upload a file to import DNS records or manually add them for your domain.
In CNAME setup, you can only add A, AAAA, and CNAME records, for which proxy cannot be disabled.
Import DNS records at a time (recommended)
On the Websites page, find the website that you want to manage, and click the website name or View Details in the Actions column.
In the left-side navigation pane, choose
.Click Import. On the Import page, click Download Template. Then modify the downloaded template as needed. Example:
;Host TTL IN RecordType RecordValue ;You can only import A, AAAA, and CNAME records for websites connected in CNAME setup. $ORIGIN example.com. ; A record 1.example.com. 600 IN A 8.8.8.8 ; AAAA record 2.example.com. 600 IN AAAA 2400:cb00:2049:1::a29f:f9 ; CNAME record 2.example.com. 600 IN CNAME example.com.
Click Select File to import the DNS records.
NoteAfter the import, A and AAAA records that correspond to the same hostname are collectively referred to as one A/AAAA record.
Select an appropriate business scenario to further improve the acceleration performance.
Click OK.
Add DNS records manually
On the Websites page, find the website that you want to manage, and click the website name or View Details in the Actions column.
In the left-side navigation pane, choose
.Click Add Record. In the dialog box that appears, add a DNS record.
Parameter
Description
Proxy Status
In CNAME setup, proxy cannot be disabled.
Record Type
Supported record types are A, AAAA, and CNAME.
Hostname
The prefix of the subdomain. For example, if you add a subdomain named
www.example.com
, enterwww
in the Hostname field.Record Value
Enter the value based on the selected record type. For example, the record value of an A record is an IP address.
TTL
Specifies how long resolution results are retained in the local DNS cache.
NoteThe TTL cannot be adjusted for proxied DNS records.
Click Next and select a business scenario based on your business requirements.
Click OK.
By default, when an ESA POP requests resources from the origin server, the domain name in a client request is used as the Host request header. If you configure an origin domain name that is different from the requested domain name, such as one that a CNAME record points to, you need to modify the Host request header in origin requests to ensure that desired resources are returned. For more information, see Origin host.
Add a CNAME record to enable proxy
After you add the DNS records to DCDN, you must add a CNAME record to map your domain to the CNAME. This way, requests are forwarded to POPs to implement content delivery acceleration, edge computing, and protection.
Different DNS providers have different methods to add CNAME records.
Make sure that the DNS records do not conflict with each other in the same system.
The server that DCDN uses for domain name resolution is deployed in the Chinese mainland. If you configure region-specific DNS settings for your domain name, for example, you add a CNAME record for your DCDN-accelerated domain name only in regions outside the Chinese mainland, including Hong Kong (China), Macao (China), and Taiwan (China), the domain name cannot be mapped to the CNAME. The CNAME status is Pending Configuration in the DCDN console. However, acceleration for the domain name is not affected.
CNAMEs that are assigned by Alibaba Cloud CDN, DCDN, ApsaraVideo Live, and ApsaraVideo VOD can be used only for domain name resolution. If Alibaba Cloud detects that your CNAME is used for unauthorized or malicious activities, Alibaba Cloud reserves the right to close your Alibaba Cloud account and remove the domain names.
Alibaba Cloud
If your DNS provider is Alibaba Cloud, perform the following steps to add a CNAME record for the domain:
Log on to the Alibaba Cloud DNS console with the Alibaba Cloud account to which the domain belongs.
Optional. Add a domain that is not registered with Alibaba Cloud.
NoteIf the domain is not registered with Alibaba Cloud, you need to add the domain to Alibaba Cloud DNS before you can add a DNS record for the domain. For more information, see Manage domain names. If the domain is registered with Alibaba Cloud, skip this step.
On the Domain Name Resolution page, find your domain and click DNS Settings in the Actions column.
Click Add DNS Record to add a record.
NoteThe CNAME record of a specific domain takes precedence over that of a wildcard domain. If you want to accelerate a wildcard domain, where the DNS record contains an asterisk (*), you need to delete all other DNS records that match the wildcard domain.
Parameter
Description
Example
Record Type
Select CNAME.
CNAME
Hostname
For root domains, enter
@
.For wildcard domains, enter
*
.For subdomains, enter the prefix of the subdomain.
Root domains
aliyundoc.com:
@
aliyundoc.com.cn:
@
Wildcard domains
.aliyundoc.com:
*
.aliyundoc.com.cn:
*
*.example.aliyundoc.com:
*.example
*.example.aliyundoc.com.cn:
*.example
Subdomains
example.aliyundoc.com:
example
example.aliyundoc.com.cn:
example
www.example.aliyundoc.com:
www.example
www.example.aliyundoc.com.cn:
www.example
Note.com.cn is a top-level domain that consists of two hierarchical levels.
DNS Request Source
Select Default from the drop-down list.
We recommend that you keep the default setting.
Record Value
Enter the CNAME of the domain.
NoteEach domain is assigned a unique CNAME. Subdomains cannot use the CNAME of the root domain. If you want to accelerate a subdomain, add the subdomain to DCDN. Alibaba Cloud then assigns a CNAME to the subdomain. Alternatively, you can add a wildcard domain to DCDN. Subdomains that match the wildcard domain name are mapped to the CNAME of the wildcard domain. For more information, see Add a domain name.
www.example.com.w.kunlunsl.com
TTL Period
Enter a time-to-live (TTL) value for the record. A smaller value indicates that the record is updated quicker. The default TTL is 10 minutes.
We recommend that you keep the default setting.
Click OK.
Tencent Cloud
If your DNS provider is Tencent Cloud, perform the following steps to add a CNAME record for the domain:
Log on to the DNSPod console.
On the DNSPod page, click Add Records to add a CNAME record.
Parameter
Description
Example
Host
For root domains, enter
@
.For wildcard domains, enter
*
.For subdomains, enter the prefix of the subdomain.
Root domains
aliyundoc.com:
@
aliyundoc.com.cn:
@
Wildcard domains
.aliyundoc.com:
*
.aliyundoc.com.cn:
*
*.example.aliyundoc.com:
*.example
*.example.aliyundoc.com.cn:
*.example
Subdomains
example.aliyundoc.com:
example
example.aliyundoc.com.cn:
example
www.example.aliyundoc.com:
www.example
www.example.aliyundoc.com.cn:
www.example
Note.com.cn is a top-level domain that consists of two hierarchical levels.
Type
Select CNAME.
CNAME
Split Zone
Select Default.
We recommend that you keep the default setting.
Value
Enter the CNAME of the domain.
NoteEach accelerated domain name is assigned a unique CNAME. Subdomains cannot use the CNAME of the root domain. If you want to accelerate a subdomain, add the subdomain to DCDN. Alibaba Cloud then assigns a CNAME to the subdomain. Alternatively, you can add a wildcard domain name to DCDN. Subdomains that match the wildcard domain name are mapped to the CNAME of the wildcard domain name. For more information, see Add a domain name.
www.example.com.w.kunlunsl.com
Weight
You do not need to set this parameter.
N/A
MX
You do not need to set this parameter.
N/A
TTL
Enter a TTL value for the CNAME record. A smaller value indicates that the record is updated quicker.
We recommend that you keep the default setting.
Click Confirm.
Huawei Cloud
Log on to the DNS console.
In the left-side navigation pane, click Public Zones. The Public Zones page appears.
In the row of the domain for which you want to add a CNAME record, click the domain name.
Click Add Record Set. On the page that appears, add a CNAME record.
Parameter
Description
Example
Name
For root domains, enter
@
.For wildcard domains, enter
*
.For subdomains, enter the prefix of the subdomain.
Root domains
aliyundoc.com:
@
aliyundoc.com.cn:
@
Wildcard domains
.aliyundoc.com:
*
.aliyundoc.com.cn:
*
*.example.aliyundoc.com:
*.example
*.example.aliyundoc.com.cn:
*.example
Subdomains
example.aliyundoc.com:
example
example.aliyundoc.com.cn:
example
www.example.aliyundoc.com:
www.example
www.example.aliyundoc.com.cn:
www.example
Note.com.cn is a top-level domain that consists of two hierarchical levels.
Type
Select CNAME.
CNAME
Alias
You do not need to set this parameter.
No
Line
Select Default.
Keep the default setting.
TTL (s)
Enter a TTL value for the CNAME record. A smaller value indicates that the record is updated quicker.
Keep the default setting.
Value
Enter the CNAME of the domain.
NoteEach accelerated domain name is assigned a unique CNAME. Subdomains cannot use the CNAME of the root domain. If you want to accelerate a subdomain, add the subdomain to DCDN. Alibaba Cloud then assigns a CNAME to the subdomain. Alternatively, you can add a wildcard domain name to DCDN. Subdomains that match the wildcard domain name are mapped to the CNAME of the wildcard domain name. For more information, see Add a domain name.
https://www.example.com.w.kunlunsl.com/
Weight
You do not need to set this parameter.
N/A
Click OK.
Cloudflare
Log in to your Cloudflare account and select the domain for which you want to add a CNAME record.
On the page that appears, choose DNS > Records. Click Add record to add a CNAME record.
Parameter
Description
Example
Type
Select CNAME.
CNAME
Name (required)
Enter the hostname.
For root domains, enter
@
.For wildcard domains, enter
*
.For subdomains, enter the prefix of the subdomain.
Root domains
aliyundoc.com:
@
aliyundoc.com.cn:
@
Wildcard domains
.aliyundoc.com:
*
.aliyundoc.com.cn:
*
*.example.aliyundoc.com:
*.example
*.example.aliyundoc.com.cn:
*.example
Subdomains
example.aliyundoc.com:
example
example.aliyundoc.com.cn:
example
www.example.aliyundoc.com:
www.example
www.example.aliyundoc.com.cn:
www.example
Note.com.cn is a top-level domain that consists of two hierarchical levels.
Target (required)
Enter the CNAME of the domain.
NoteEach accelerated domain name is assigned a unique CNAME. Subdomains cannot use the CNAME of the root domain. If you want to accelerate a subdomain, add the subdomain to DCDN. Alibaba Cloud then assigns a CNAME to the subdomain. Alternatively, you can add a wildcard domain name to DCDN. Subdomains that match the wildcard domain name are mapped to the CNAME of the wildcard domain name. For more information, see Add a domain name.
https://www.example.com.w.kunlunsl.com/
Proxy status
Disable proxy.
Disabled
TTL
Enter a TTL value for the CNAME record. A smaller value indicates that the record is updated quicker.
Auto
Click Save.
AWS (Amazon Route 53)
Google Cloud
Log on to Google Cloud console and go to the Cloud DNS page.
Click the domain for which you want to add a CNAME record.
On the Zone details page, click ADD RECORD SET to add a CNAME record.
Parameter
Description
Example
DNS Name
Enter the hostname.
For root domains, enter
@
.For wildcard domains, enter
*
.For subdomains, enter the prefix of the subdomain.
Root domains
aliyundoc.com:
@
aliyundoc.com.cn:
@
Wildcard domains
.aliyundoc.com:
*
.aliyundoc.com.cn:
*
*.example.aliyundoc.com:
*.example
*.example.aliyundoc.com.cn:
*.example
Subdomains
example.aliyundoc.com:
example
example.aliyundoc.com.cn:
example
www.example.aliyundoc.com:
www.example
www.example.aliyundoc.com.cn:
www.example
Note.com.cn is a top-level domain that consists of two hierarchical levels.
Resource Record Type
Select CNAME.
CNAME
TTL
Enter a TTL value for the CNAME record. A smaller value indicates that the record is updated quicker.
Auto
Canonical name
Enter the CNAME of the domain.
NoteEach accelerated domain name is assigned a unique CNAME. Subdomains cannot use the CNAME of the root domain. If you want to accelerate a subdomain, add the subdomain to DCDN. Alibaba Cloud then assigns a CNAME to the subdomain. Alternatively, you can add a wildcard domain name to DCDN. Subdomains that match the wildcard domain name are mapped to the CNAME of the wildcard domain name. For more information, see Add a domain name.
https://www.example.com.w.kunlunsl.com/
Click Create.
GoDaddy
Sign in to your GoDaddy Domain Portfolio.
Click the domain for which you want to add a CNAME record to access its Domain Settings page.
Click DNS to view your DNS records for the domain. Select Add New Record and then select CNAME from the Type menu.
Parameter
Description
Example
Name
Enter the hostname.
For root domains, enter
@
.For wildcard domains, enter
*
.For subdomains, enter the prefix of the subdomain.
Root domains
aliyundoc.com:
@
aliyundoc.com.cn:
@
Wildcard domains
.aliyundoc.com:
*
.aliyundoc.com.cn:
*
*.example.aliyundoc.com:
*.example
*.example.aliyundoc.com.cn:
*.example
Subdomains
example.aliyundoc.com:
example
example.aliyundoc.com.cn:
example
www.example.aliyundoc.com:
www.example
www.example.aliyundoc.com.cn:
www.example
Note.com.cn is a top-level domain that consists of two hierarchical levels.
Value
Enter the CNAME of the domain.
NoteEach accelerated domain name is assigned a unique CNAME. Subdomains cannot use the CNAME of the root domain. If you want to accelerate a subdomain, add the subdomain to DCDN. Alibaba Cloud then assigns a CNAME to the subdomain. Alternatively, you can add a wildcard domain name to DCDN. Subdomains that match the wildcard domain name are mapped to the CNAME of the wildcard domain name. For more information, see Add a domain name.
https://www.example.com.w.kunlunsl.com/
TTL (Time to Live)
Enter a TTL value for the CNAME record. A smaller value indicates that the record is updated quicker.
Auto
Click Save.