I tried to create or associate an Amazon Route 53 hosted zone and received the error "ConflictingDomainExists".
Resolution
Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshoot AWS CLI errors. Also, make sure that you're using the most recent AWS CLI version.
Scenario 1: You created a private hosted zone or associated a VPC with a private hosted zone in Route 53
You can't have a hosted zone with the same name as another hosted zone that is associated with the same Amazon Virtual Private Cloud (Amazon VPC). Take one of the following actions:
- Remove any private hosted zone from the specified Amazon VPC that has the same name as the new hosted zone.
- Create a new private hosted zone with a different domain name.
To get a list of private hosted zones that you have associated with specific Amazon VPCs, run the list-hosted-zones-by-vpc AWS CLI command:
aws route53 list-hosted-zones-by-vpc --vpc-id VPC\_ID --vpc-region REGION\_ID
Note: Replace VPC_ID and REGION_ID with your values.
When you enable private DNS for Amazon VPC interface endpoints, Route 53 automatically creates and manages AWS managed private hosted zones. Because these private hosted zones are AWS managed, they're not visible in your console. To check for AWS managed private hosted zones, use the list-hosted-zones-by-vpc command in the AWS CLI. If the name conflict results from a private DNS for the interface endpoint, then either turn off private DNS or delete the Amazon VPC interface endpoint.
Scenario 2: You tried to create a public hosted zone in Route 53 with a reusable delegation set
If you have an existing hosted zone, you can't create a new hosted zone with the same name that uses the same name servers from a reusable delegation set. You also can't specify a reusable delegation set if the new hosted zone is the parent or child of an existing hosted zone, such as example.com and test.example.com.
To resolve this issue, you can create a new delegation set with different name servers that don't overlap. Use the new set to create a hosted zone. Or, you can create the hosted zone without a delegation set. Then, Route 53 verifies that existing hosted zones don't share the namespace.
Related information
I received a conflicting DNS domain error while creating an interface VPC endpoint. How can I fix this?
AssociateVPCWithHostedZone
Enable private DNS names