All Products
Search
Document Center

ApsaraVideo VOD:Add a CNAME record in Alibaba Cloud DNS

Last Updated:Jun 05, 2024

After you add a domain name for CDN, Alibaba Cloud CDN assigns a CNAME 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 topic describes how to configure a CNAME record for a domain name in the Alibaba Cloud DNS console.

Background information

Before you add a CNAME record, make sure that you understand the following concepts:

Prerequisites

A domain name for CDN is added. For more information, see Add a domain name for CDN.

Procedure

  1. Obtain the CNAME record of the accelerated domain name.

    1. Log on to the ApsaraVideo VOD console.

    2. In the left-side navigation pane, choose Configuration Management > CDN Configuration > Domain Names.

    3. Find the desired domain name, move the pointer over the view icon, and then copy the CNAME record of the accelerated domain name.

      复制CNAME

  2. 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.

    1. Log on to the Alibaba Cloud DNS console with the Alibaba Cloud account to which the domain name belongs.

    2. Optional. Add the domain name to Alibaba Cloud DNS if it is not registered with Alibaba Cloud.

      Note

      If the domain name is not registered with Alibaba Cloud, you need to add the domain name to Alibaba Cloud DNS before you can add a DNS record for it. For more information, see Manage domain names. If the domain name is registered with Alibaba Cloud, skip this step.

    3. On the Domain Name Resolution page, find the domain name that you want to manage and click DNS Settings in the Actions column.

    4. Click Add DNS Record to add a CNAME record.

      Important
      • Each domain name has one CNAME. The CNAME of a root domain name cannot be used by its subdomains. If you need to accelerate a subdomain, you can add the domain name to Alibaba Cloud CDN and resolve it to the corresponding CNAME. You can also add a wildcard domain to Alibaba Cloud CDN because the CNAME of a wildcard domain can be used by its subdomains.

      • 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 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 Not Configured in the ApsaraVideo VOD 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.

      Parameter

      Description

      Example

      Record Type

      Select CNAME.

      CNAME

      Hostname

      • For root domains, enter @.

      • For wildcard domains, enter *.

      • For subdomains, enter the prefix of the subdomain.

      • Root domains

        • aliyundoc.com: @

        • aliyundoc.com.cn: @

      • Wildcard domains

        • .aliyundoc.com: *

        • .aliyundoc.com.cn: *

        • *.example.aliyundoc.com: *.example

        • *.example.aliyundoc.com.cn: *.example

      • Subdomains

        • example.aliyundoc.com: example

        • example.aliyundoc.com.cn: example

        • www.example.aliyundoc.com: www.example

        • www.example.aliyundoc.com.cn: www.example

      Note

      .com.cn is a top-level domain that consists of two hierarchical levels.

      DNS Request Source

      Select Default from the drop-down list.

      We recommend that you keep the default setting.

      Record Value

      Enter the CNAME record that you copied in Step 1.

      Note

      Each accelerated domain name is assigned a unique CNAME. Subdomains cannot use the CNAME of the root domain. If you want to accelerate a subdomain, add the subdomain to Alibaba Cloud CDN and map the subdomain to the corresponding CNAME record.

      www.example.com.w.kunlunsl.com

      TTL

      Enter a time-to-live (TTL) value for the record. A smaller value indicates that the record is updated quicker. The default TTL value is 10 minutes.

      We recommend that you keep the default setting.

    5. 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.

  3. Check whether the CNAME record takes effect.

    1. Open the Command Prompt in Windows.

    2. 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.

      CNAME生效验证

FAQ

How do I check whether a CNAME record takes effect?