When I try to add a CNAME alias for my CloudFront distribution, I get an error similar to the following:

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

This error occurs when the CNAME alias you are attempting to add is already associated with another CloudFront distribution, which CloudFront doesn't allow. 

To resolve the issue, start by asking 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, ask your DNS provider to create the following TXT record:

example.com TXT d123.cloudfront.net

After the record is created, contact AWS support and ask that AWS verify DNS domain name ownership and ensure that you can add the corresponding CNAME alias for your CloudFront distribution. CNAME records created by your DNS provider can take up to 5 business days to propagate through DNS.

Note: AWS support cannot associate the same CNAME for more than one distribution; they can only assist you 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, such as the following:

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

... consider adding an underscore before the TXT record, as in the following example:

_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: 2017-07-07