After you add a domain name to Alibaba Cloud CDN, Alibaba Cloud CDN assigns a CNAME to the domain name. To enable the CDN service for the domain name, you must add a CNAME record to map the domain name to the CNAME. This way, requests destined for the domain name for CDN can be redirected to the CDN nodes that are nearest to the clients. This topic describes how to configure a CNAME record for a domain name in Alibaba Cloud DNS.
- Obtain the CNAME assigned to the domain name for CDN.
- Log on to the ApsaraVideo VOD console.
- In the left-side navigation pane, choose .
- On the Domain Names page, move the pointer over the View icon, and copy the CNAME
of the domain name for CDN.
- Add a CNAME record for the accelerated domain name.The following procedure uses the Alibaba Cloud DNS console as an example to describe how to configure a CNAME record for the accelerated domain name. You can perform similar operations in other DNS services such as DNSPod, Xinnet, and GoDaddy to configure a CNAME record for the accelerated domain name.
- Log on to the Alibaba Cloud DNS console.
- On the Manage DNS page, select the domain name that you want to manage, and then click Configure in the Actions column.
- Click Add Record.Note
- Each domain name for CDN has one CNAME. The CNAME of a primary domain name cannot be used by the second-level domain name. If you need to accelerate a second-level domain name, you must add the domain name to Alibaba Cloud CDN and resolve it to its CNAME. You can also add a wildcard domain name to Alibaba Cloud CDN because the CNAME of a wildcard domain name can be used by a second-level domain name.
- Type: Select
CNAME - Canonical namefrom the drop-down list.
- Host: Enter the prefix of the domain name for CDN.
Domain name for CDN Host
- ISP Line: Use the default value.
- Value: Enter the CNAME assigned to the domain name for CDN.
- TTL: TTL stands for Time To Live. It limits the lifespan or lifetime of data in a computer or network. Use the default value.
- Click Confirm.After the CNAME record takes effect, CDN acceleration is automatically enabled for the domain name.Note
- After you add a CNAME record, it immediately takes effect. After you modify a CNAME record, the modifications take effect within 72 hours.
- After you add a CNAME record, the system updates the status in the console about 10 minutes later. Before the update, you may be prompted to add a CNAME record. Ignore the message.
- Check whether the CNAME record has taken effect.
- Open the Command Prompt in Windows.
- Run the ping command to ping the domain name for CDN. If the CNAME in the output matches the CNAME
assigned to the domain name for CDN in the Alibaba Cloud CDN console, the CDN service
is enabled for the domain name.