Applicable to:
- Plesk for Linux
- Plesk for Windows
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:
CONFIG_TEXT: 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
Comments
1 comment
I have two subdomains that point to the same directory. subdom1.mydomain.com and subdom2.mydomain that both point to the directory /my/path/to/http
I want to delete one of the subdomains. when I click the Remove Subdomain option, it warns that it will delete the directory and all files even though the other subdomain still points at it.
I want to remove subdom1 but not affect any of the files so that subdom2 still will work.
How is this handled?
Please sign in to leave a comment.