Delete a Lightsail web address
Delete a Lightsail web address that you no longer need. You can delete a web address with the Unattached or Create failed status. If your web address is attached to a resource, detach it first. For instructions, see Detach a web address using the Lightsail console.
After you delete a web address, another account can take its name: right away if it was never attached, or after 30 to 37 days if it was. For more information, see What happens to the name of a deleted web address.
What happens to the name of a deleted web address
-
If you delete a web address that was previously attached to a resource, Lightsail holds its name for 30 to 37 days. This cooldown period protects the visitors of your site who still use the old web address, because no other account can create a web address with the name and serve them different content. Your account can create a web address with the same name again during the cooldown period, so if you change your mind, you can get the name back. The deleted web address counts toward your quota during the cooldown period.
-
If your web address was never attached to a resource, its name is available as soon as the deletion finishes.
-
If you delete a web address that still has child web addresses, it changes to the Implicit status, and its child web addresses keep working. You aren't charged for an implicit web address, and it doesn't count toward your quota. For more information, see Child web addresses.
Delete a web address using the Lightsail console
Complete the following procedure to delete a web address using the Lightsail console.
-
Sign in to the Lightsail console
. -
In the left navigation pane, choose Lightsail web addresses.
-
Choose the vertical ellipsis (⋮) icon next to the web address that you want to delete, and then choose Delete.
-
Enter
confirm, and then choose Delete web address.
Delete a web address using the AWS CLI
Complete the following procedure to delete a web address using the AWS CLI. For more information, see delete-subdomain in the AWS CLI Command Reference.
In the Lightsail API and AWS CLI, web addresses are called subdomains.
You can run the following commands in AWS CloudShell. CloudShell is a browser-based, pre-authenticated shell that you can launch directly from the Lightsail console. With CloudShell, you can run AWS CLI commands using your preferred shell, such as Bash, PowerShell, or Z shell, without downloading or installing command line tools. For more information, see Manage Lightsail resources with AWS CloudShell.
To use the AWS CLI on your own computer, install and configure it first. For instructions, see Set up and configure the AWS CLI for Lightsail operations.
-
Open a Terminal, AWS CloudShell, or Command Prompt window.
-
Enter the following command to list your web addresses.
aws lightsail get-subdomains --region us-east-1Make a note of the
subdomainNamevalue of the web address that you want to delete. -
Enter the following command to delete the web address.
aws lightsail delete-subdomain --subdomain-nameSubdomainName--region us-east-1In the command, replace
SubdomainNamewith the name of your web address.The command returns an operation. The web address no longer appears in the output of
get-subdomains, unless it has child web addresses, in which case its state isIMPLICIT.