Error CNAME - Cannot save zone record: Duplicate record

Symptoms

The following error is thrown when trying to add a record to a zone:

Cannot save zone record: Duplicate record

or

Error CNAME example.tld found, but other records with same label exist

or

Cannot save zone record: A DNS zone cannot contain a CNAME record for a host which already has another type of record. 

Please check that this zone does not have both CNAME and other types of records for the same host.

Cause

  1. A CNAME record exists with a label of a different record type.
    e.g., the zone for example.tld with the following records would cause an error:
    www.example.tld CNAME example.tld
    www.example.tld A 1.2.3.4
    As per RFC1912 (section 2.4), A CNAME record is not allowed to coexist with any other data. In other words, if example.tld is a canonical name for www.example.tld, you can't also have an MX record for www.example.tld, or an A record, or even a TXT record.

    Do NOT try to combine CNAMEs and NS records like this!:

    example.com IN NS ns1.domain.tld
    example.com IN NS ns2.domain.tld
    example.com IN CNAME sub.example.com
    sub.example.com IN A 1.2.3.4


    Since no other records are allowed to coexist with a CNAME, the NS entries are ignored. Therefore all the hosts in the example.com domain are ignored as well!

    If you want to have your domain also be a host, do the following:

    example.com IN NS ns1.domain.tld
    example.com IN NS ns2.domain.tld
    example.com IN A 1.2.3.4
    sub.example.com IN A 1.2.3.4
  2. CNAME with a label that equals hostname exists:
    example2.tld CNAME example2.tld.

 

3.  There is a subdomain on a lower level, for example:

You want to add sub1.domain.ext as a CNAME, but there is a record on sub2.sub1.domain.ext.

While this configuration is not prohibited, it can cause a validation error.

In this case, remove or rename the sub2.sub1.domain.ext record, and add the sub1.domain.ext CNAME, or make sure you add CNAMES first.

 

 

 

 

 

Was this article helpful?
Additional questions? Submit a request