After a domain name is added to Alibaba Cloud Dynamic Route for CDN (DCDN), the DCDN service assigns a canonical name (CNAME) to the domain name. To enable the DCDN service, you must configure a CNAME record to map the domain name to the CNAME. This way, requests destined for the domain name can be sent to DCDN cache nodes. This topic describes how to configure a CNAME record for your domain name with Alibaba Cloud Domain Name System (DNS).

Procedure

  1. Query the canonical name (CNAME) of the accelerated domain name.
    1. Log on to the DCDN console.
    2. In the left-side navigation pane, click Domain Names.
    3. On the Domain Names page, copy the CNAME of the accelerated domain name.
      Copy the CNAME
      Note We recommend that you copy the CNAME of the domain name that is in the Normal state.
  2. Add a CNAME record for the domain name.
    The following example shows how to add a CNAME record for a domain name. The Alibaba Cloud DNS console is used in this example. 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.
    2. On the Manage DNS page, click the Domains tab, select the domain name that you want to manage, and then click Configure in the Actions column.
    3. Click Add Record and add a CNAME record.
      Note DCDN assigns a CNAME for each domain name that you want to accelerate. 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 DCDN and resolve it to the corresponding CNAME. You can also add a wildcard domain name to DCDN because the CNAME of a wildcard domain name can be used by a second-level domain name.
      Add a CNAME record
      • Type: Select CNAME from the drop-down list.
      • Host: Enter the prefix of the domain name.
        Domain name Host
        testcdn.aliyun.com testcdn
        www.aliyun.com www
        aliyun.com @
        *.aliyun.com *
      • ISP Line: Use the default value.
      • Value: Enter the CNAME that is assigned to the domain name.
      • TTL: Use the default value.
    4. Click OK.
      After the CNAME record takes effect, Alibaba Cloud 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, it takes about 10 minutes for the system to update the status in the console. The system may prompt that you must add a CNAME record. Ignore the message.
  3. Check whether the CNAME record has taken effect.
    1. Open the Command Prompt in Windows.
    2. Run the ping command to ping the domain name. If the CNAME in the output matches the CNAME assigned to the domain name by DCDN in the DCDN console, the DCDN service is enabled for the domain name.
      Check whether the CNAME record has taken effect