After you add a domain name, DCDN assigns you a CNAME. You must then point the DNS record for your domain name to the assigned CNAME at your DNS provider. This forwards access requests to DCDN nodes to enable website acceleration, edge computing, and security protection.
Background
Acceleration mechanism
After you add a domain name, the system assigns you a CNAME. This record points to globally distributed DCDN nodes. User requests are routed to these nodes. If a node has the requested content in its cache, the content is returned directly. If the content is not cached, the node requests the content from the origin server and caches it for future access. In this way, DCDN improves content delivery speed and user experience. Make sure that your DNS record points to the CNAME record value provided by DCDN to ensure that traffic is routed through the acceleration service.
Domain name resolution
Domain name resolution is a service that resolves a domain name, such as example.aliyundoc.com, to the IP address that a client connects to. For more information, see What is domain name resolution?
Prerequisites
A domain name is added. For more information, see Add a service domain name.
Step 1: Obtain the CNAME for the domain name
Go to the Domain Names page in the DCDN console. Copy the CNAME record value for the domain name.
Step 2: Configure CNAME resolution
The method for configuring CNAME resolution varies based on your DNS provider. Follow the procedure that applies to your provider.
-
If your DNS provider is Alibaba Cloud, see Alibaba Cloud CNAME configuration.
-
If your DNS provider is Tencent Cloud, see Tencent Cloud CNAME configuration procedure.
-
Domain name resolution rules from the same DNS provider may conflict with each other.
-
Alibaba Cloud DCDN uses servers in the Chinese mainland to verify DNS records. If you configure different DNS records for different regions, a conflict may occur. For example, you might configure the Alibaba Cloud DCDN CNAME only for regions outside the Chinese mainland, such as Hong Kong (China), Macao (China), and Taiwan (China). In this case, the verification servers cannot resolve the CNAME. The CNAME status of the domain name is then displayed as Pending Configuration in the DCDN console. However, this does not affect the DCDN acceleration service.
-
The CNAMEs for Alibaba Cloud CDN, DCDN, ApsaraVideo Live, and ApsaraVideo VOD can be used only for scheduling and resolution by Alibaba Cloud CDN. Alibaba Cloud reserves the right to disable the domain names and accounts that maliciously use CNAMEs.
Tencent Cloud CNAME configuration procedure
Step 3: Verify the CNAME configuration
-
Method 1: One-click verification
-
Go to the Domain Names page in the DCDN console.
-
Select the destination domain name. Move the pointer over the CNAME Status of the domain name. If the status is Configured, the CNAME configuration has taken effect.
-
Method 2: Verify using the nslookup command
Open Command Prompt in Windows or Terminal in macOS or Linux.
Run the nslookup -type=CNAME command. If the output matches the CNAME provided in the DCDN console for the , the DCDN acceleration service is active. For example:
nslookup -type=CNAME www.example.com
References
If the cache hit ratio is low after you enable DCDN, you can use the prefetch feature to prefetch popular resources before peak hours. This can improve the cache hit ratio. For more information, see Purge and prefetch resources.
