All Products
Search
Document Center

DNS record conflict rules

Last Updated: Dec 31, 2021

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.

RFC

Optimization of 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.

Warning

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

Notice

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.

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. ❌: 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. ✅: 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. ↔️: 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

NS

↔️

CNAME

↔️

A

↔️

URL

MX

↔️

TXT

↔️

AAAA

↔️

SRV

↔️

CAA

↔️

Notice

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. ❌: 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. ✅: 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. ️↔️: 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

NS

↔️

CNAME

↔️

A

↔️

URL

MX

↔️

TXT

↔️

AAAA

↔️

SRV

↔️

CAA

↔️

Notice

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.