After you add a domain name to Dynamic Content Delivery Network (DCDN), we recommend that you test whether the domain name is accessible before you update the CNAME record of the domain name. This ensures that DNS updates do not affect the services of the domain name. This topic describes how to test whether a domain name is accessible after it is mapped to the CNAME assigned by DCDN.

Note During the test, requests are sent to DCDN points of presence (POPs). You are charged for the basic services and value-added services of DCDN that you have used. The billing rules of DCDN apply in the test. For more information, see Overview.

Prerequisites

  • A domain name is added to DCDN. If you have not added a domain name to DCDN, add one to DCDN. For more information, see Add a domain name.
  • The origin server that you configure can be accessed.

Procedure

  1. Obtain the CNAME of 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.
      Note Copy the CNAME of the domain name that is in the Normal state.
      Copy CNAME
  2. Obtain the IP address of the CNAME.
    Note The following IP address is an example returned by running the ping command and is for reference only. To obtain the actual IP address of your CNAME, run the ping command to ping your CNAME.
    • Windows: To obtain the IP address of your CNAME, open the command-line interface and run the ping CNAME command.
    • macOS: To obtain the IP address of your CNAME, open the command-line interface and run the dig CNAME command.MAc dig CNAME
  3. Add the IP address and domain name to the hosts file of the on-premises machine.

    You must add the IP address obtained from Step 2 and the domain name to the hosts file of the on-premises machine. Make sure that you add the IP address before the domain name.

    In this example, the domain name is example.com, the CNAME is example.com.w.kunlunsl.com, and the IP address of the CNAME is 192.168.0.1.

    • The path of the hosts file in Windows is C:\Windows\System32\drivers\etc\hosts. The following figure provides an example. Example
    • The path of the hosts file in macOS is Finder > Go > Go to the folder > /etc/hosts. The following figure provides an example. hosts file
  4. Test whether the domain name is accessible.
    After you add the IP address and domain name to the hosts file, you can open the browser and enter the domain name in the address bar to test the connectivity. You can view the test result by using the developer tool of the browser.
    • If the IP address in the Remote Address field is the same as the one that you add to the hosts file, the configuration is valid. You can configure the CNAME on the DNS service provider side. Test the connectivity of the website
    • If the IP address in the Remote Address field is different from the one that you add to the hosts file, the configuration is invalid. Make sure that you add the IP address of the CNAME to the hosts file.

    After you access the domain name, you can also test other features by using the on-premises machine.