All Products
Search
Document Center

Global Accelerator:Add a CNAME record for a domain name

Last Updated:Jan 30, 2024

If you use Global Accelerator (GA) to accelerate a domain name, you must configure DNS settings and map the domain name that you want to accelerate to the CNAME that is allocated by GA. This topic describes how to add a CNAME record for a domain name by using Alibaba Cloud DNS.

Step 1: Obtain the CNAME of the domain name that you want to accelerate

  1. Log on to the GA console.

  2. On the Instances page, find the GA instance that you want to manage, and click the instance ID.

  3. On the page that appears, click the Instance Information tab.

  4. In the Basic Information section, find CNAME and click Copy to copy the CNAME.

    cname

Step 2: Add a CNAME record

  1. Log on to the Alibaba Cloud DNS console.

  2. If your domain name is not registered by using Alibaba Cloud Domains, you must add your domain name to Alibaba Cloud DNS.

    Note

    If your domain name is not registered by using Alibaba Cloud Domains, you must add your domain name to Alibaba Cloud DNS before you can configure a DNS record. For more information, see the "Add a domain name" section of the Manage domain names topic. If your domain name is registered by using Alibaba Cloud Domains, skip this step.

  3. On the Manage DNS page, find the domain name and click Configure in the Actions column to go to the DNS Settings page.

  4. On the DNS Settings page, click Add DNS Record.

  5. In the Add Record panel, configure the parameters and click Confirm. The following table describes the parameters.

    Parameter

    Description

    Record Type

    Select CNAME from the drop-down list.

    Hostname

    Enter the prefix of the domain name that you want to accelerate.

    • If the domain name that you want to accelerate is www.aliyun.com, set the prefix to www.

    • If the domain name that you want to accelerate is aliyun.com, set the prefix to @.

    • If the domain name that you want to accelerate is *.aliyun.com, set the prefix to *.

    • If the domain name that you want to accelerate is mail.aliyun.com, set the prefix to mail.

    DNS Request Source

    Use the default value.

    Record Value

    Paste the CNAME that you copied in Step 1: Obtain the CNAME of the domain name that you want to accelerate.

    TTL

    Specifies how long a record is cached by a DNS server. A smaller TTL value indicates that the resolver retains the information in the cache for a shorter period of time.

    In this example, the default value 10 Minutes is used.

Step 3: Check whether the CNAME record takes effect

In this example, the Windows operating system is used to check whether the CNAME record takes effect.

  1. Open the Windows command prompt.

  2. Run the ping command to ping the accelerated domain name.

    If the CNAME in the output is the same as the CNAME that is allocated by GA, the CNAME record takes effect.CNAME生效验证