After you add a domain name to Alibaba Cloud CDN, 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).
Background information
How it works
After you add a domain name to Alibaba Cloud CDN, 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 POPs to accelerate content delivery. For more information, see How it works.
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 record of the accelerated domain name
Go to the Domain Names page in the Alibaba Cloud CDN 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.
If you have configured an A record for the accelerated domain name, to avoid service interruptions, you must verify that the accelerated domain name is accessible by following instructions in (Optional) Test whether a domain name is accessible. Then, disable the A record and map the accelerated domain name to the CNAME record.
If you add a CNAME record for a wildcard domain name such as *.aliyundoc.com, the second-level domain names such as example.aliyundoc.com of the wildcard domain name can be accelerated, while the third-level domain names cannot. For more information, see Does Alibaba Cloud CDN support wildcard domain names?
Make sure that the DNS records do not conflict with each other in the same system.
The server that Alibaba Cloud CDN 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 Alibaba Cloud CDN-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 Alibaba Cloud CDN 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 Alibaba Cloud CDN console
Log on to the Alibaba Cloud CDN 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.
NoteIf you add a CNAME record, it takes effect immediately. If you modify a CNAME record, it takes 10 minutes for the update to take effect because the default TTL value of a CNAME record is 10 minutes. During this period, the CNAME status may be displayed as Pending configuration in the Alibaba Cloud CDN console until the update takes effect. The actual time period varies based on the TTL value that you specify for the CNAME record.
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 Alibaba Cloud CDN console, Alibaba Cloud CDN acceleration takes effect for the domain name.
What to do next
After you complete the preceding steps, you can configure features of Alibaba Cloud CDN for your domain name. For more information, see Features.