After you add a domain name to Dynamic Content Delivery Network (DCDN), the system assigns a CNAME record 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). This enables content delivery acceleration, edge computing, and protection of web resources.
Background information
How it works
After you add a domain name to DCDN, the system assigns a CNAME to the domain name. You must map the accelerated domain name, such as example.aliyundoc.com, to the assigned CNAME such as example.aluyundoc.com.w.cdngslb.com. This way, client requests can be forwarded to DCDN POPs to accelerate content delivery.
Domain name resolution
Domain name resolution is the process of converting a domain name, such as example.aliyundoc.com, into an IP address of the client. For more information, see What is DNS resolution?
Prerequisites
A domain name is added by following instructions in Add a domain name.
Step 1: Obtain the CNAME of the accelerated domain name
Go to the Domain Names page in the DCDN console and copy the CNAME record of the accelerated domain name.
Step 2: Add a CNAME record
Different DNS service providers have different methods to add CNAME records.
If your DNS service provider is Alibaba Cloud, see Add a CNAME record on Alibaba Cloud.
If your DNS service provider is Tencent Cloud, see Add a CNAME record on Tencent Cloud.
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.
Add a CNAME record on Tencent Cloud
Step 3: Verify that the CNAME record takes effect
Method 1: Use the DCDN console
Log on to the DCDN console and navigate to the Domain Names page.
Find the domain name and move the pointer over the CNAME Status column. If the CNAME status is Configured, the CNAME has taken effect.
Method 2: Run the nslookup command
Start Command Prompt in Windows or Terminal in macOS or Linux.
Run the nslookup -type=CNAME domainName command. If the CNAME record in the output is the same as the CNAME record that is assigned to the domain name in the DCDN console, DCDN acceleration takes effect for the domain name.
References
If the cache hit ratio is lower than expected after you use DCDN to accelerate content delivery for a domain name, you can configure and enable the prefetch feature. The prefetch feature allows DCDN to prefetch content from origin servers to DCDN POPs during off-peak hours. This increases the cache hit ratio. For more information, see Refresh and prefetch resources.