After you add a domain name to Alibaba Cloud CDN, the system assigns a CNAME to the domain name. You must add a CNAME record in the system of your DNS service provider to map the domain name to the CNAME before requests can be redirected to points of presence (POPs). Otherwise, CDN acceleration cannot take effect. This topic describes how to add a CNAME record.
Prerequisites
A domain name is added to Alibaba Cloud CDN. For more information about how to add a domain name to Alibaba Cloud CDN, see Add a domain name.
Important - Make sure that the DNS records do not conflict with each other in the same system.
- The server that Alibaba Cloud CDN uses to resolve the CNAME of a domain name is deployed in the Chinese mainland. If you configure region-specific DNS settings for your domain names, for example, you add a CNAME record for your CDN-accelerated domain name in regions outside the Chinese mainland, including Hong Kong (China), Macao (China), Taiwan (China), the domain name cannot be mapped to the CNAME. The status of the CNAME is Pending Configuration in the Alibaba Cloud CDN console. However, CDN acceleration for the domain name is not affected.
- CNAMEs that are assigned by Alibaba Cloud CDN, Dynamic Content Delivery Network (DCDN), ApsaraVideo Live, and ApsaraVideo VOD can be used only for domain name resolution. If Alibaba Cloud discovers 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.
Domain name overview
A domain name consists of several hierarchical levels that are separated by periods (.
). The rightmost part is called the top-level domain name. The top-level domain name is also called the suffix. Common top-level domain names include .com
, .org
, .net
, and .cn
. Some top-level domain names may contain two hierarchical levels, such as .com.cn
, .org.cn
, and .net.cn
.
- A top-level domain name combined with a unique domain name is called a root domain name, such as aliyundoc.com and aliyundoc.com.cn.
- A third-level domain name is a lower level of the root domain name, such as example.aliyundoc.com and example.aliyundoc.com.cn.
- A fourth-level domain name is a lower level of the third-level domain name, such as www.example.aliyundoc.com and www.example.aliyundoc.com.cn.
Third-level domain names and fourth-level domain names are also called subdomain names. For more information, see Terms.
Add a CNAME record on Alibaba Cloud
If your DNS service provider is Alibaba Cloud, perform the following steps to add a CNAME record for the domain name:
- Log on to the Alibaba Cloud CDN console, navigate to the Domain Names page, and then copy the CNAME of the domain name.
- Add a CNAME record.
- Log on to the Alibaba Cloud DNS console with the Alibaba Cloud account to which the domain name belongs.
- Optional: In the Alibaba Cloud DNS console, add a domain name that is not registered with Alibaba Cloud.
Note If the domain name is not registered with Alibaba Cloud, you must add the domain name to Alibaba Cloud DNS before you can add a DNS record for it. For more information, see
Domain management. If the domain name is registered with Alibaba Cloud, skip this step.
- On the Domain Name Resolution page, find the domain name that you want to manage and click DNS Settings in the Actions column.
- Click Add DNS Record and add a CNAME record.
Note The CNAME record of a specific domain name takes precedence over that of a wildcard domain name. 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 from the drop-down list. | CNAME |
Hostname | - For root domains, enter
@ . - For wildcard domains, enter
* . - For subdomains, enter the prefix of the subdomain.
For more information about subdomain names, see Domain name overview. | - 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 name.
Note Each 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 Alibaba Cloud CDN. Alibaba Cloud then assigns a CNAME to the subdomain. Alternatively, you can add a wildcard domain name to Alibaba Cloud CDN. 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 |
TTL Period | Enter a time-to-live (TTL) value for the CNAME record. A smaller value indicates that the record is updated quicker. The default TTL value is 10 minutes. | We recommend that you keep the default setting. |
- Click OK.
If you add a CNAME record, it takes effect immediately. If you modify a CNAME record, it takes 10 minutes for the updates to take effect because the default TTL value of a CNAME record is 10 minutes. The time period varies based on the TTL value that you specify for the CNAME record. The system may prompt that you must add a CNAME record in the CDN console. Ignore the message.
Add a CNAME record on Tencent Cloud
If your DNS service provider is Tencent Cloud, perform the following steps to add a CNAME record for the domain name:
- Log on to the Alibaba Cloud CDN console, navigate to the Domain Names page, and then copy the CNAME of the domain name.
- Add a CNAME record.
- Log on to the DNSPod console.
- On the DNSPod page, click Add Records and 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. |
Record Type | Select CNAME from the drop-down list. | CNAME |
Split Zone | Select Default from the drop-down list. | We recommend that you keep the default setting. |
Value | Enter the CNAME of the domain name.
Note Each 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 Alibaba Cloud CDN. Alibaba Cloud then assigns a CNAME to the subdomain. Alternatively, you can add a wildcard domain name to Alibaba Cloud CDN. 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.
If you add a CNAME record, it takes effect immediately. If you modify a CNAME record, it takes 10 minutes for the updates to take effect because the default TTL value of a CNAME record is 10 minutes. The time period varies based on the TTL value that you specify for the CNAME record. The system may prompt that you must add a CNAME record in the CDN console. Ignore the message.
Check whether the CNAME record takes effect
- Method 1: Quick verification in the Alibaba Cloud CDN console
- Log on to the Alibaba Cloud CDN console and navigate to the Domain Names page.
- Select the domain name and move the pointer over the CNAME Status column. The CNAME Configuration Guide tooltip appears.
- Click Open Configuration Guide and then click Search.
- Method 2: Run the ping command
- Open Command Prompt in Windows.
- Run the ping Accelerated domain name command in the CLI. If the CNAME in the output is the same as the CNAME that is assigned to the domain name in the CDN console, CDN acceleration is enabled for the domain name.

What to do next
After you complete the preceding settings, you can configure features of Alibaba Cloud CDN for the domain name. For more information, see Features.