How to Resolve the "You May Not Mix CNAME Records with Other Records" Error Make it Rain Paper

  • DNS, DNS Management, CNAME
  • 0

Pre-requirements

  • Access to your DNS management interface (cPanel, Plesk, etc.) or server command-line (for advanced users).
  • Basic understanding of DNS record types (CNAME, A, MX, etc.).
  • Familiarity with editing DNS zone files.

Introduction

When attempting to add a DNS record for a domain or subdomain, you may encounter the error:

Error: example_domain.tld. already has a CNAME record. You may not mix CNAME records with other records.

This error occurs because CNAME (Canonical Name) records cannot coexist with other DNS records like A, MX, or TXT records for the same domain or subdomain. This article explains the cause of the error and how to resolve it.

Why Can't CNAME Records Be Mixed with Other Records?

A CNAME record acts as an alias that points to another domain name. This means it is essentially a placeholder for all the records associated with the domain it points to. Because of this, you cannot have both a CNAME and other DNS record types (such as A or MX records) for the same domain or subdomain.

For example, if www.example_domain.com has a CNAME record pointing to example.com, you cannot also have an A record for www.example_domain.com. This would create a conflict, as the CNAME is expected to represent all DNS records for the domain it points to.

Steps to Resolve the Error

Step Description Linux Command (optional)
1. Access DNS Management Log into your DNS management interface (cPanel, Plesk, etc.) to manage your DNS records. N/A
2. Identify Existing CNAME Record Check whether a CNAME record exists for the domain or subdomain you are trying to modify. Look for any CNAME entries for the conflicting domain (e.g., www.example_domain.com).
dig www.example_domain.com CNAME
3. Delete the Existing CNAME Record If you want to add another type of DNS record (A, MX, TXT, etc.) for the domain or subdomain, you must first delete the existing CNAME record.
whmapi1 removezonerecord domain=example_domain.com name=www recordtype=CNAME
4. Add New DNS Record Once the CNAME record has been removed, you can now add the desired DNS record (e.g., an A or MX record). Ensure that the subdomain you are adding the record for no longer has a CNAME entry.
whmapi1 addzonerecord domain=example_domain.com name=www recordtype=A address=203.0.113.2
5. Verify DNS Changes Use a DNS lookup tool to verify that the new DNS record has been added correctly. Ensure that no conflicting CNAME records remain.
dig www.example_domain.com

Gotchas to Avoid

  • Mixing CNAME and A Records: Avoid trying to add both CNAME and A records for the same domain or subdomain. Delete the CNAME first before adding another record type.
  • DNS Propagation: Remember that DNS changes may take some time to propagate. Typically, changes can take up to 48 hours to fully propagate across the internet.
  • Check for Subdomain Conflicts: Be sure to check for any conflicting records for subdomains when managing your DNS zones.

When you see the error "You may not mix CNAME records with other records", it's a result of trying to add conflicting DNS records for a domain or subdomain that already has a CNAME record. By following the steps outlined in this guide, you can remove the existing CNAME record and successfully add your desired DNS record type.


Did this answer help?

« Back