Question
How to remove a domain / subdomain / domain alias from Plesk?
Answer
-
Go to Domains and select domains that need to be removed.
-
Click the Remove button.
Note: If the main domain of a subscription is removed, all additional domains under this subscription will be removed too.
-
Connect to a Plesk server via SSH (Linux) / RDP (Windows Server).
-
Run the following command:
-
to remove a domain / subdomain:
# plesk bin domain --remove example.com
-
to remove a domain alias:
# plesk bin domalias --delete example.com
-
To remove multiple domains:
-
Get the list of all domains:
C> plesk bin domain --list
-
Create the file C:domains.txt and put domains that needs to be removed:
example.com
example.net
example.org -
Run the following command in a command prompt to remove domains that are specified in C:domains.txt:
C:> for /f "tokens=*" %d in ('type C:domains.txt') do plesk bin domain --remove %d