How do I delete a Route 53 hosted zone?

2 minute read
0

I want to delete an Amazon Route 53 hosted zone.

Resolution

Important: You can't undo the deletion of a hosted zone. The assigned name servers stop responding to the domain name queries after zone deletion.

To delete a Route 53 hosted zone:

1.    If applicable, verify that DNSSEC signing is turned off on the hosted zone. For information, see Turn off DNSSEC signing.

2.    Delete any records associated with the hosted zone, except for the default start of authority (SOA) and name server (NS) records.

Note: Failing to delete the records before attempting to delete the hosted zones causes the following error:

Error occurred
Before you can delete a hosted zone, you must first delete all resource record sets except the NS and SOA resource record sets for the zone apex.
(HostedZoneNotEmpty 400: The specified hosted zone contains non-required resource record sets and so cannot be deleted.)

3.    Delete your public hosted zone or delete your private hosted zone.

If you created your hosted zone using service discovery, then you can't delete the zone using the Route 53 console. Delete hosted zones created using service discovery through the AWS Cloud Map console or a servicediscovery API call. For more information, see How do I delete a Route 53 hosted zone created by service discovery?

Note: Deleted hosted zones no longer route traffic. If you create a new hosted zone for your domain later, update the NS record to route traffic to the new zone.

Related information

Working with public hosted zones

Working with private hosted zones

AWS OFFICIAL
AWS OFFICIALUpdated a year ago