All Products
Search
Document Center

CDN:FAQ: CNAME configuration

Last Updated:Jun 05, 2026

After you add an accelerated domain name to CDN, CDN assigns a CNAME address to it. To enable CDN acceleration, you must point the DNS record for the accelerated domain name to this CNAME address. This topic describes common issues with CNAME configuration.

How to verify CNAME record effectiveness

After configuring the CNAME record in the CDN console, use a query tool such as nslookup or dig to verify the configuration. We do not recommend using the ping command because the resolution information it provides can be inaccurate.

Windows

nslookup -type=CNAME <accelerated domain name>

If the output matches the CNAME address provided by CDN, the CNAME record is effective.

Linux/macOS

On Linux or macOS, use the dig command to verify the configuration:

  • Query only the CNAME target (Recommended):

    dig +short <accelerated domain name> CNAME

    If the output matches the CNAME address provided by CDN, the CNAME record is effective. The following example shows a sample output:

    dig +short cdn.example.com CNAME
    cdn.example.com.w.alikunlun.com.
  • Query detailed domain information:

    dig <accelerated domain name> CNAME

    If the CNAME value in the ANSWER SECTION of the output matches the CNAME address provided by CDN, the CNAME record is effective.

What to do if a query result is NXDOMAIN or 'record not found'?

Troubleshoot the issue by performing the following steps:

  1. Check the domain name spelling: Make sure you entered the correct domain name in the command.

  2. Check the DNS configuration: Log on to your DNS console and verify that the CNAME record exists and the host record is correct. The host record should be the prefix of the accelerated domain name, not the full domain name. For example, if the accelerated domain name is cdn.example.com, the host record should be cdn, not cdn.example.com.

  3. Wait for DNS propagation: After you modify a DNS record, it takes time for the change to propagate globally. Allow some time for propagation before trying again.

    Note

    The time it takes for a DNS record to propagate globally depends on its TTL. For example, if the TTL of the old record is 10 minutes, the new record takes at least 10 minutes to take effect. Before you modify a CNAME record, we recommend that you set the TTL of the original record to a short period, such as 60 seconds.

CNAME conflict with an A record

You cannot create an A record and a CNAME record for the same host record. A conflict error indicates that an A record or another type of record already exists for the host record. To resolve this issue, follow these steps:

  1. Log on to your DNS console and find the conflicting A record (or MX, TXT, or other record type).

  2. Delete or disable the conflicting record.

  3. Add the CNAME record again and point its value to the CNAME address assigned by CDN.

Note
  • After you delete the A record, traffic directed by that record will be interrupted. We recommend that you first use a subdomain to test and verify that CDN acceleration works as expected, and then switch over the primary domain.

  • We recommend that you perform this operation during off-peak hours.

  • If health checks are enabled for the domain name in Global Traffic Manager (GTM), GTM might automatically create a DNS record that causes a conflict. In this case, you must first resolve the issue in GTM before adding the CNAME record.

Console shows "Awaiting Configuration" or "Verification Failed"

After completing the configuration, it typically takes 5 to 30 minutes for the changes to take effect. The actual time depends on the TTL that you specified when you configured the DNS record. Once the DNS record propagates globally, the status in the CDN console will show as normal. Wait for a while and then refresh the console page to check the status.

If the domain status is not updated after a period of time, check the following items:

  1. Verify the host record: The host record must match the prefix of the accelerated domain name. For example, use a for a.example.com and @ for example.com. A common mistake is to enter www when the accelerated domain name is not www.example.com.

  2. Verify the CNAME record value: The value must exactly match the CNAME address displayed in the CDN console. We recommend that you copy the value directly from the console.

  3. Verify using nslookup or dig: Confirm that the returned CNAME points to the address assigned by CDN.

  4. Check for conflicting records: Make sure you have deleted the A record or any other conflicting records for the same host record.

Console shows "CNAME not configured" but resolution is correct

In the following scenarios, the CDN console may show the CNAME status as "CNAME not configured", but the acceleration service is running properly. This status discrepancy does not affect the service.

  • The acceleration region does not include the Chinese mainland: If you set the acceleration region to Global (excluding Chinese mainland) when adding the accelerated domain name (the corresponding API parameter Scope is set to overseas), CNAME status checks from within the Chinese mainland will show that the record is not configured. This is expected behavior and does not affect service in the intended acceleration region. You can verify that acceleration is effective outside the Chinese mainland in the following ways:

    1. Use the nslookup or dig command, or check the CDN console to confirm that the domain name resolves to the CNAME address assigned by CDN.

    2. Access the accelerated resource from a network outside the Chinese mainland and use your browser's developer tools to inspect the response header. If the X-Cache field shows a value of HIT, it indicates a CDN cache hit and that acceleration is effective.

  • Split-horizon DNS is configured: If you have configured different DNS records for different regions with your DNS provider (for example, traffic from the Chinese mainland resolves to the CDN's CNAME address, while traffic from outside the Chinese mainland resolves to the origin IP), the CDN console might show the status as "CNAME not configured" because it detects that some traffic is not resolving to CDN. You can safely ignore this message if users in your target acceleration region can access the accelerated resources.

  • DNS propagation delay: After you configure or modify a CNAME record, DNS propagation can take several minutes to a few hours to complete globally, depending on the TTL setting. During this time, the console may show that the record is not configured. Recheck the status after the propagation period.

Can a domain have multiple CNAME records?

A host record can have only one CNAME record. Configuring multiple CNAME records may cause access errors, such as a 403 error.

Solution: Ensure that only one CNAME record exists for the host record, and that its value points to the CNAME address for the currently used accelerated domain name. Delete any extra records.

How does a wildcard CNAME affect subdomains?

After configuring a CNAME record for a wildcard domain name, such as *.example.com, all subdomains without their own specific DNS records (for example, a.example.com and b.example.com) automatically inherit the wildcard record. If you do not want to use CDN acceleration for certain subdomains, you must create separate A records or other types of records for them. Specific subdomain records take precedence over wildcard records.

Note

The rules for record precedence may vary depending on your DNS provider.