Skip to content

Unable to add a CNAME record to a route53 hosted domain after I had deleted an A record alias for the same host

1

I originally had an A record aliased to a cloudfront domain for RRset x.domain.com. The record was deleted but when attempting to add a CNAME for x.domain.com, I always get error: "InvalidChangeBatch 400: RRSet of type CNAME with DNS name is not permitted as it conflicts with other records with the same DNS name in zone" I am able to add an A record x.domain.com but the CNAME is rejected. I have attempted to add A records with 60 second TTL and then delete them. Still unable to add the CNAME for x.domain.com. This is a large production domain. This issue has persisted for more than 24 hours and is actually preventing my adding CNAME's for 2 different RRsets (x.domain.com and y.domain.com).

asked a year ago823 views
1 Answer
0
Accepted Answer

This issue is related to how DNS records work in Route 53. When you're getting the error "RRSet of type CNAME with DNS name is not permitted as it conflicts with other records with the same DNS name in zone," it indicates there's still a conflict with existing records.

Here are the key points to understand:

  1. DNS protocol does not allow a CNAME record to coexist with any other record type for the same name. If you have any other record type (A, AAAA, MX, TXT, etc.) for x.domain.com, you cannot create a CNAME for the same name.

  2. Even though you deleted the A record alias, there might still be other records with the same name in your hosted zone. This could include NS records, SOA records, or other record types that you may not be immediately aware of.

  3. If x.domain.com is the zone apex (meaning it's the root domain itself), you cannot create a CNAME record for it at all. The DNS protocol does not allow CNAME records at the zone apex.

To resolve this issue:

  1. Verify that there are absolutely no other records of any type for x.domain.com in your hosted zone.

  2. Check if x.domain.com is the zone apex. If it is, you'll need to use an A record alias instead of a CNAME.

  3. If you've confirmed there are no other records and x.domain.com is not the zone apex, you might need to wait longer for DNS propagation or contact AWS Support as there could be a caching issue in the Route 53 system.

  4. As an alternative, you could use Route 53's alias record functionality instead of a CNAME if you're pointing to another AWS resource.
    Sources
    Supported DNS record types - Amazon Route 53
    Resolve CNAME record issues in Windows DNS server | AWS re:Post

answered a year ago
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.