Articles in this section

How to remove a domain / subdomain / domain alias from Plesk

Plesk for Windows kb: how-to Plesk for Linux ABT: Group B

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

Question

How to remove a domain / subdomain / domain alias from Plesk?

Answer

 

Removing a domain via Plesk

 

  1. Log in to Plesk.

  2. Go to Domains and select domains that need to be removed.

  3. Click the Remove button.

    Note: If the main domain of a subscription is removed, all additional domains under this subscription will be removed too.


    Screenshot_2019-12-25_Domains_-_Plesk_Onyx_17_8_11.png

 

Removing a domain via a command-line interface

 

  1. Connect to a Plesk server via SSH (Linux)RDP (Windows Server).

  2. 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:

  1. Get the list of all domains:

    C\> plesk bin domain --list

  2. Create the file C:\domains.txt and put domains that needs to be removed:

    CONFIG_TEXT: example.com
    example.net
    example.org

  3. 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

 

Additional Information

Was this article helpful?

Comments

1 comment
Date Votes
  • 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?

    0

Please sign in to leave a comment.