After you add a domain name to Dynamic Route for CDN (DCDN), the system assigns a canonical name (CNAME) to the domain name. To map the domain name to the CNAME, you must configure a CNAME record for the domain name. This way, requests that are destined for the domain name are redirected to DCDN nodes, which helps accelerate content delivery. If an A record conflicts with the CNAME record that you want to use, change the A record to a CNAME record.

Methods that are used to configure a CNAME record

You must configure CNAME records in the system of your DNS service provider. This topic describes how to configure a CNAME record on Alibaba Cloud, Tencent Cloud, and Xinnet. You can use similar methods to configure a CNAME record in the systems of other DNS service providers.

Configure a CNAME record on Alibaba Cloud

If your DNS service provider is Alibaba Cloud, perform the following steps to add a CNAME record for the domain name:

  1. Obtain the CNAME that is assigned to the 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 domain name.
      CNAME 01
  2. Add a CNAME record for the domain name.
    1. Log on to the Alibaba Cloud DNS console.
    2. On the Manage DNS page, find the domain name that you want to manage and click Configure in the Actions column.
    3. Click Add Record to add a CNAME record.
      Note
      • The CNAME record of a specific domain name takes precedence over that of a wildcard domain name. If the domain name to accelerate is a wildcard domain name, and the host record includes an asterisk (*), you must delete all effective DNS records of the second-level domain names that match the wildcard domain name.
      • If the CNAME record that you want to add conflicts with an existing DNS record, we recommend that you change the domain name or modify the DNS record.
      Add a CNAME record
      Parameter Description Example
      Type Select CNAME from the drop-down list. CNAME
      Host Enter the prefix of the domain name.
      • If the domain name to accelerate is testcdn.aliyun.com, enter testcdn.
      • If the domain name to accelerate is www.aliyun.com, enter www.
      • If the domain name to accelerate is aliyun.com, enter @.
      • If the domain name to accelerate is *.aliyun.com, enter *.
      ISP Line Specify the default ISP line. Keep the default setting.
      Value
      Enter the CNAME that is assigned to the domain name.
      Note Each domain name is assigned a unique CNAME. Second-level domain names cannot use the CNAME of the top-level domain name. If you want to accelerate a second-level domain name, you must add the domain name to DCDN and resolve the domain name to the CNAME that you want to use. The CNAME of a wildcard domain name can be used by a second-level domain name. Therefore, you can also add a wildcard domain name to DCDN. For more information, see Add a domain name.
      all.example.com.w.kunlunsl.com
      TTL Enter a time-to-live (TTL) value for the CNAME record. A smaller value specifies a shorter time to apply record updates. The default TTL value is 10 minutes. Keep the default setting.
    4. Click OK.
      After the CNAME record takes effect, the domain name is immediately accelerated. After you add a CNAME record, the CNAME record 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 in the DCDN console. During this process, a message may appear, which prompts you to add a CNAME record. Ignore the message.
  3. Check whether the CNAME record takes effect
    1. Open Command Prompt in Windows.
    2. Run the ping command to ping the domain name. If the CNAME in the output matches the CNAME that is assigned to the domain name in the DCDN console, the DCDN service is enabled for the domain name.
      Check whether the CNAME record takes effect

Configure a CNAME record on Tencent Cloud

If your DNS service provider is Tencent Cloud, perform the following steps to add a CNAME record for the domain name:

  1. Obtain the CNAME that is assigned to the 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 domain name.
      CNAME 01
  2. Add a CNAME record for the domain name.
    1. Log on to the DNSPod console.
    2. On the DNSPod page, click Add Records to add a CNAME record.
      Parameter Description Example
      Host Enter the prefix of the domain name.
      • If the domain name to accelerate is testcdn.aliyun.com, enter testcdn.
      • If the domain name to accelerate is www.aliyun.com, enter www.
      • If the domain name to accelerate is aliyun.com, enter @.
      • If the domain name to accelerate is *.aliyun.com, enter *.
      Type Select CNAME from the drop-down list. CNAME
      Line Type Select Default from the drop-down list. Keep the default setting.
      Value
      Enter the CNAME that is assigned to the domain name.
      Note Each domain name is assigned a unique CNAME. Second-level domain names cannot use the CNAME of the top-level domain name. If you want to accelerate a second-level domain name, you must add the domain name to DCDN and resolve the domain name to the CNAME that you want to use. The CNAME of a wildcard domain name can be used by a second-level domain name. Therefore, you can also add a wildcard domain name to DCDN. For more information, see Add a domain name.
      all.example.com.w.kunlunsl.com
      Weight You do not need to set this parameter. N/A
      MX You do not need to set this parameter. N/A
      TTL Enter a TTL value for the CNAME record. A smaller value indicates a shorter time to apply record updates. Keep the default setting.
    3. Click Confirm.
      After the CNAME record takes effect, the domain name is immediately accelerated. After you add a CNAME record, the system takes approximately 10 minutes to update the status in the DCDN console. During this process, a message may appear, which prompts you to add a CNAME record. Ignore the message.
  3. Check whether the CNAME record takes effect
    1. Open Command Prompt in Windows.
    2. Run the ping command to ping the domain name. If the CNAME in the output matches the CNAME that is assigned to the domain name in the DCDN console, the DCDN service is enabled for the domain name.
      Check whether the CNAME record takes effect

Configure a CNAME record on Xinnet

If your DNS service provider is Xinnet, perform the following steps to add a CNAME record for the domain name:

  1. Obtain the CNAME that is assigned to the 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 domain name.
      CNAME 01
  2. Add a CNAME record for the domain name.
    1. Log on to Xinnet.
    2. Go to the DNS records page and find the domain name that you want to manage. Then, click Add CNAME Record to add a CNAME record.
      Parameter Description Example
      CNAME Enter the CNAME that is assigned to the domain name.
      Note Each domain name is assigned a unique CNAME. Second-level domain names cannot use the CNAME of the top-level domain name. If you want to accelerate a second-level domain name, you must add the domain name to DCDN and resolve the domain name to the CNAME that you want to use. The CNAME of a wildcard domain name can be used by a second-level domain name. Therefore, you can also add a wildcard domain name to DCDN. For more information, see Add a domain name.
      all.example.com.w.kunlunsl.com
      CNAME Host Enter the prefix of the domain name.
      • If the domain name to accelerate is testcdn.aliyun.com, enter testcdn.
      • If the domain name to accelerate is www.aliyun.com, enter www.
      • If the domain name to accelerate is aliyun.com, enter @.
      • If the domain name to accelerate is *.aliyun.com, enter *.
      TTL Enter a TTL value for the CNAME record. A smaller value indicates a shorter time to apply record updates. Keep the default setting.
    3. Click Submit.
      After the CNAME record takes effect, the domain name is immediately accelerated. After you add a CNAME record, the system takes approximately 10 minutes to update the status in the DCDN console. During this process, a message may appear, which prompts you to add a CNAME record. Ignore the message.
  3. Check whether the CNAME record takes effect
    1. Open Command Prompt in Windows.
    2. Run the ping command to ping the domain name. If the CNAME in the output matches the CNAME that is assigned to the domain name in the DCDN console, the DCDN service is enabled for the domain name.
      Check whether the CNAME record takes effect

References

If the cache hit ratio is lower than expected after you use DCDN to accelerate content delivery for a domain name, you can configure and enable the prefetch feature. The prefetch feature allows DCDN to prefetch content from origin servers to DCDN nodes during off-peak hours. This increases the cache hit ratio. For more information, see Refresh and prefetch.