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

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

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 cannot associate the same CNAME for more than one distribution. They can assist you only with switching a CNAME between two distributions or 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"

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-04-26