When I try to add a CNAME alias to a single Amazon CloudFront distribution or multiple CloudFront distributions, I get an error similar to the following:

Status Code: 409; Error Code: CNAMEAlreadyExists; Request ID:a123456b-c78d-90e1-23f4-gh5i67890jkl

You can't use the same CNAME alias for more than one CloudFront distribution. The CNAMEAlreadyExists error occurs when the CNAME alias you're trying to add is already associated with another CloudFront distribution.


If the error code you receive is "CNAMEAlreadyExists," follow these steps to resolve the issue:

First, direct your DNS provider to create a TXT record in the following format:

<CNAME alias> TXT <CloudFront distribution name>

For example, if you're adding the CNAME alias example.com for your CloudFront distribution named d123.cloudfront.net, direct your DNS provider to create the following TXT record:

example.com TXT d123.cloudfront.net

Note: CNAME records created by your DNS provider can take up to five business days to propagate through the DNS.

After the record is created, contact AWS Support and ask that AWS verify the ownership of the DNS domain name to be sure that you can add the CNAME alias to your distribution. Be sure that you provide a copy of the CNAMEAlreadyExists error message in your case with AWS Support.

Note: AWS Support can't associate the same CNAME for more than one distribution. They can assist you only with switching a CNAME between two distributions or with removing a CNAME from a distribution.

If your DNS provider doesn't allow for identical TXT and CNAME records, consider adding an underscore before the CNAME alias in the TXT record. For example, the following TXT and CNAME records are identical:

cname.example.com.   900   IN   TXT     "dexample123456.cloudfront.net"
cname.example.com.   900   IN   CNAME   "dexample123456.cloudfront.net"

These TXT and CNAME records differ because there is an underscore before the first entry:

_cname.example.com.   900   IN   TXT     "dexample123456.cloudfront.net"
cname.example.com.   900   IN   CNAME   "dexample123456.cloudfront.net"

CNAMEAlreadyExists: One or more of the CNAMEs you provided are already associated with a different distribution at DNS level

If the CNAMEAlreadyExists response that you receive includes the message "One or more of the CNAMEs you provided are already associated with a different distribution at DNS level," then you must verify that you don't have an active DNS record pointing to another CloudFront distribution.

When you remove a CNAME from a distribution but leave the DNS record in place, the API call fails and leaves the CNAME associated to the distribution so that another user can't take the CNAME until the DNS has been removed or disabled.

Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2016-04-25

Updated: 2018-09-10