Updated on 2024-09-02 GMT+08:00

Overview

Background

If you have added a domain name, the system automatically assigns a CNAME to it. The CNAME cannot be accessed directly. You must add the CNAME to your domain's DNS records. Then requests for your domain name will be redirected to CDN PoPs for acceleration.

What Is DNS Resolution?

When you use DNS for the first time, you may have some questions, such as "What is DNS resolution?", "Why is DNS resolution required?", "How is DNS resolution done?", and "What is an A record?". If you have similar questions, visit Domain Name Service Help Center to find the answers.

How Do I Add a CNAME Record?

If your DNS provider is Huawei Cloud, see Adding a CNAME Record on Huawei Cloud DNS.

DNS Conflicts

When you add a CNAME record, you may be informed of a DNS conflict, for example, an existing A record may conflict with the CNAME record, or an existing MX record may conflict with the CNAME record. For details, see Why Is a Message Indicating Conflict with an Existing Record Set Displayed When I Add a Record Set?

Table 1 Restrictions between record types

-

NS

CNAME

A

AAAA

MX

TXT

PTR

SRV

CAA

NS

No limita

Conflict

No limit

No limit

No limit

No limit

No limit

No limit

No limit

CNAME

Conflictb

No limit

Conflict

Conflict

Conflict

Conflict

Conflict

Conflict

Conflict

A

No limit

Conflict

No limit

No limit

No limit

No limit

No limit

No limit

No limit

AAAA

No limit

Conflict

No limit

No limit

No limit

No limit

No limit

No limit

No limit

MX

No limit

Conflict

No limit

No limit

No limit

No limit

No limit

No limit

No limit

TXT

No limit

Conflict

No limit

No limit

No limit

No limit

No limit

No limit

No limit

PTR

No limit

Conflict

No limit

No limit

No limit

No limit

No limit

No limit

No limit

SRV

No limit

Conflict

No limit

No limit

No limit

No limit

No limit

No limit

No limit

CAA

No limit

Conflict

No limit

No limit

No limit

No limit

No limit

No limit

No limit

a: NS record sets can be added for primary domains (for example, example.com). There are no restrictions on subdomains (for example, www.example.com).

b: For primary domains (for example, example.com), you can add CNAME record sets and NS record sets at the same time. However, CNAME record sets conflict with NS record sets for subdomains (for example, www.example.com), and therefore they cannot be added at the same time.

  • Conflict: The two types of record sets cannot coexist in the same resolution line.
  • No limit: The two types of record sets can coexist without restrictions.

Two common record set conflicts are:

  1. A CNAME record conflicts with an A record.
    • How do I resolve this problem?

      Delete the A record and then configure the CNAME record.

    • Do I need to keep the A record for my website so that it remains accessible?

      As long as the CNAME record is configured, all client requests will be sent to CDN. In this case, you do not need to configure an A record.

    For details about how the CNAME record works, see How CDN Works.

  2. A CNAME record conflicts with an MX record.

    For details, see Why Is a Message Indicating Conflict with an Existing Record Set Displayed When I Add a Record Set?