After you add a domain name in the ApsaraVideo VOD console, ApsaraVideo VOD assigns a CNAME to the domain name. You must add a CNAME record to map the domain name to the CNAME. This way, ApsaraVideo VOD forwards requests destined for the domain name to POPs. This topic describes how to configure a CNAME record for a domain name in the Alibaba Cloud DNS console.
- Obtain the CNAME assigned to the domain name.
- Log on to the ApsaraVideo VOD console.
- In the left-side navigation pane of the ApsaraVideo VOD console, choose .
- On the Domain Names page, find the domain name whose CNAME you want to obtain, move the pointer over the View icon, and then copy the CNAME.
- Add a CNAME record. The following example describes how to add a CNAME record for a domain name in the Alibaba Cloud DNS console. If your DNS service is provided by other DNS service providers, such as DNSPod, Xinnet, or GoDaddy, add a CNAME record for your domain name in the system of your service provider. The procedure is similar to the one that is described in this topic.
- Log on to the Alibaba Cloud DNS console. The Domain Name Resolution page appears.
- On the Authoritative Domain Names tab, find the domain name for which you want to add a CNAME record and click DNS Settings in the Actions column. You do not need to add a CNAME record for a domain name registered with Alibaba Cloud. After you register a domain name with Alibaba Cloud, you can directly configure DNS settings in the Alibaba Cloud DNS console. If a domain name is not registered with Alibaba Cloud, you must add the domain name to the Alibaba Cloud DNS console before you configure DNS settings. For more information about how to add a domain name, see Domain Management.
- On the page that appears, click Add DNS Record and add a CNAME record. Note
- Each domain name has one CNAME. The CNAME of a root domain name cannot be used by a 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 the corresponding 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.
- 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 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.
- Record Type: Select
CNAMEfrom the drop-down list.
- Hostname: Specify a prefix for the domain name. The following table describes the common prefixes of domain names and sample domain names.
Prefix Sample domain name Description demo demo.aliyundoc.com The subdomain name is resolved. @ aliyundoc.com The main domain name is resolved. * *.aliyundoc.com A wildcard DNS record is configured.
- DNS Request Source: Use the default value.
- Record Value: Enter the CNAME of the accelerated domain name, which is the CNAME in Step 1.
- TTL Period: Time To Live (TTL) specifies the lifetime of the DNS record in Alibaba Cloud DNS. Use the default value.
- Click OK. After the CNAME record takes effect, Alibaba Cloud CDN 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 takes approximately 10 minutes to update the status of the domain name in the console. The system may prompt that you must add a CNAME record. Ignore the message.
- Check whether the CNAME record is in effect.
- Open the Command Prompt in Windows.
- Run the ping command to ping the domain name. If the CNAME in the output is the same as the CNAME that is assigned to the domain name, CDN acceleration is enabled for the domain name.