Cause of DNS record conflicts
The priorities of DNS records that are used during recursive queries vary based on the types of DNS records. Some types of DNS records that have the same host record and resolution line cannot be used at the same time. If these types of DNS records are used at the same time, DNS configuration risks may occur and services may become unavailable. The following example describes the conflict between a CNAME record and an MX record that are configured for a domain name.
Example
In this example, a CNAME record and an MX record are configured for dnswork.top.
Record type | Host record | Record value |
MX | www | mx1.hichina.com |
CNAME | www | demo.dnswork.top |
Conclusion
The Remote Function Call (RFC) protocol defines that CNAME records have the highest priority. Therefore, the resolution result of the CNAME record is preferentially returned during DNS queries. As a result, you cannot obtain the MX record, and your email service is affected. In this case, Alibaba Cloud DNS prompts a record conflict to help you avoid the configuration risk.
For more information, see RFC 1034 and RFC 2181. The following figure shows the related information in RFC 2181.
Solution to conflicts between CNAME and MX records
To meet business requirements, Alibaba Cloud DNS optimizes the rules that apply for conflicts between CNAME and MX records when the host record is @.
If the host record is @, the CNAME and MX records no longer conflict with each other.
In this scenario, the email address may always or sometimes fail to receive emails.
If the local DNS server of the mail server preferentially resolves the CNAME record that is configured for the @ record, the MX type that is configured for the @ record may not be resolved or the resolution result of the MX type cannot be obtained as expected.
Example
Record type | Host record | Record value |
MX | @ | mx1.hichina.com |
CNAME | @ | example.com |
If the host record is not @, the MX and CNAME records that are configured for the host record still conflict with each other. For more information about the conflict rules, see the second table in the following section.
Solution to conflicts between CNAME and TXT records
To meet business requirements, Alibaba Cloud DNS optimizes the rules that apply for conflicts between CNAME and TXT records when the host record is @.
If the host record is @, the CNAME and TXT records no longer conflict with each other.
Record type | Host record | Record value |
TXT | @ | db642353e95243c12d3 |
cname | @ | example.com |
If the host record is not @, the TXT and CNAME records that are configured for the host record still conflict with each other. For more information about the conflict rules, see the second table in the following section.
In this scenario, the email address may fail to receive emails, the email may be rejected by the recipient, and TXT record verification may fail. In this case, we recommend that you delete the CNAME record.
Solution to conflicts between other DNS records
You can delete the involved DNS records or change the host name to resolve record conflicts.
DNS record conflict rules
Scenario in which the host record is @
The following table describes the DNS record conflict rules when the DNS records have the same host record and resolution line.
1. ❌: prompts a record conflict between the two types of DNS records. The two types of DNS records that have the same host record and resolution line cannot be used at the same time. For example, if an A record is configured for dnswork.top, you cannot configure a CNAME record for dnswork.top.
2. ✅: prompts that the two types of DNS records do not conflict with each other. The two types of DNS records that have the same host record and resolution line can be used at the same time. For example, if an A record is configured for dnswork.top, you can configure an MX record for dnswork.top.
3. ↔️: prompts that the two types of DNS records can be configured simultaneously. Multiple DNS records that are of the same type and have the same resolution line can be configured. For example, if an A record is configured for dnswork.top, you can configure another A record for dnswork.top.
NS | CNAME | A | URL | MX | TXT | AAAA | SRV | CAA | SVCB (Alias Mode) | SVCB (Service Mode) | HTTPS (Alias Mode) | HTTPS (Service Mode) | |
NS | ↔️ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
CNAME | ✅ | ↔️ | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
A | ✅ | ❌ | ↔️ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
URL | ✅ | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
MX | ✅ | ✅ | ✅ | ✅ | ↔️ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
TXT | ✅ | ✅ | ✅ | ✅ | ✅ | ↔️ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
AAAA | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | ↔️ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
SRV | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ↔️ | ✅ | ✅ | ✅ | ✅ | ✅ |
CAA | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ↔️ | ✅ | ✅ | ✅ | ✅ |
SVCB (Alias Mode) | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ↔️ | ❌ | ✅ | ✅ |
SVCB (Service Mode) | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ↔️ | ✅ | ✅ |
HTTPS (Alias Mode) | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ↔️ | ❌ |
HTTPS (Service Mode) | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ↔️ |
When Alibaba Cloud DNS prompts a record conflict, the record that you want to add already exists or conflicts with an existing record. In this case, you cannot add the record.
Scenario in which the host record is not @
The following table describes the DNS record conflict rules when the DNS records have the same host record and resolution line.
1. ❌: prompts a record conflict between the two types of DNS records. The two types of DNS records that have the same host record and resolution line cannot be used at the same time. For example, if an A record is configured for www.dnswork.top, you cannot configure a CNAME record for www.dnswork.top.
2. ✅: prompts that the two types of DNS records do not conflict with each other. The two types of DNS records that have the same host record and resolution line can be used at the same time. For example, if an A record is configured for www.dnswork.top, you can configure an MX record for www.dnswork.top.
3. ️↔️: prompts that the two types of DNS records can be configured simultaneously. Multiple DNS records that are of the same type and have the same resolution line can be configured. For example, if an A record is configured for www.dnswork.top, you can configure another A record for www.dnswork.top.
NS | CNAME | A | URL | MX | TXT | AAAA | SRV | CAA | SVCB (Alias Mode) | SVCB (Service Mode) | HTTPS (Alias Mode) | HTTPS (Service Mode) | |
NS | ↔️ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
CNAME | ❌ | ↔️ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
A | ❌ | ❌ | ↔️ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
URL | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
MX | ❌ | ❌ | ✅ | ✅ | ↔️ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
TXT | ❌ | ❌ | ✅ | ✅ | ✅ | ↔️ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
AAAA | ❌ | ❌ | ✅ | ❌ | ✅ | ✅ | ↔️ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
SRV | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ↔️ | ✅ | ✅ | ✅ | ✅ | ✅ |
CAA | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ↔️ | ✅ | ✅ | ✅ | ✅ |
SVCB (Alias Mode) | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ↔️ | ❌ | ✅ | ✅ |
SVCB (Service Mode) | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ↔️ | ✅ | ✅ |
HTTPS (Alias Mode) | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ↔️ | ❌ |
HTTPS (Service Mode) | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ↔️ |
When Alibaba Cloud DNS prompts a record conflict, the record that you want to add already exists or conflicts with an existing record. In this case, you cannot add the record.