subdomain: Subdomains
The subdomain
utility is used to manage subdomains through CLI. By using this utility, you can perform the following tasks:
- creating, renaming, and removing subdomains
- displaying information about subdomain configuration
- managing domain hosting parameters such as support of various scripting languages, log settings, hard disk limits, and SSL support
- managing FTP user account for subdomains
Usage
subdomain <command> <subdomain_name> [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
Example
The following command creates subdomain sample.example.com on the domain example.com, sets the disk space quota for the subdomain to 1 GB, enables support for SSI, PHP, and SSL.
plesk bin subdomain --create subdomain -domain example.com -hard_quota 1G -ssi true -php true -ssl true
Commands
Command | Parameter | Description | Example |
---|---|---|---|
|
|
Creates a subdomain on a specified domain. Required Use the asterisk (*) symbol to create a wildcard subdomain. Site visitors will be redirected to this subdomain regardless of the subdomain name they enter in a browser. |
To create the subdomain sample on the domain example.com: plesk bin subdomain --create sample -domain example.com or plesk bin subdomain -c sample -domain example.com |
|
|
Updates an existing subdomain. Required |
To rename the subdomain from sample.example.com to forum.example.com: plesk bin subdomain --update sample -domain example.com -new_name forum or plesk bin subdomain -u sample -domain example.com -new_name forum |
|
|
Removes one or more specified subdomains from a specified domain. Required |
To remove subdomains sample.example.com and forum.example.com from the domain example.com: plesk bin subdomain --remove -subdomains sample,forum -domain example.com or plesk bin subdomain -r -subdomains sample,forum -domain example.com |
|
|
Displays information on configuration of one or more specified subdomains. If no subdomain is specified, displays info about all subdomains on a domain. Required |
To view information about all subdomains on the domain example.com: plesk bin subdomain --info -domain example.com or plesk bin subdomain -i -domain example.com |
|
|
Suspends the subdomain. |
To suspend subdomains sample.example.com and forum.example.com from the domain example.com: plesk bin subdomain --suspend -subdomains sample,forum -domain example.com |
|
|
Displays help on the use of the utility. |
To view the help info on the use of this utility: plesk bin subdomain --help or plesk bin subdomain -h |
|
|
Displays the list of domains. |
To see the list of all domains on the server: plesk bin subdomain -l |
Options
Option | Parameter | Description | Example |
---|---|---|---|
|
|
Specifies the parent domain to which the subdomain belongs. |
To create a subdomain on example.com: plesk bin subdomain -c subdom -domain example.com |
|
|
Renames a subdomain. Used with the |
To rename the subdomain from sample.example.com to forum.example.com: plesk bin subdomain -u subdom -domain example.com -new_name forum |
|
|
Specifies the HTTP response status code to be used for standard forwarding. |
To use the 302 code for forwarding on the subdomain sample.example.com, which has the standard forwarding type of hosting: plesk bin subscription -u sample.example.com -http_code 302 |
|
|
Sets list of IPv4 and IPv6 addresses for the mail service. |
To set the mail service IP for the subdomain sample.example.com to 192.168.1.2: plesk bin subdomain -u sample -domain example.com -mail-service-ip 192.168.1.2 |
|
|
Specifies the document root directory for a subdomain, relative to the webspace root directory. |
To specify the directory /site2 as the root directory for the subdomain sample.example.com: plesk bin subdomain --create sample -domain example.com -www-root /site2 |
|
|
Enables/Disables SSI support. Is |
To enable SSI support on the subdomain forum.example.com: plesk bin subdomain -u forum -domain example.com -ssi true |
|
|
Enables/Disables PHP support. Is |
To enable PHP support on the subdomain sample.example.com: plesk bin subdomain -u sample -domain example.com -php true |
|
|
Enables/Disables CGI support. Is |
To enable CGI support on the subdomain sample.example.com: plesk bin subdomain -u sample -domain example.com -cgi true |
|
|
Enables/Disables FastCGI support. Is |
To enable FastCGI support on subdomain sample.example.com: plesk bin subdomain -u sample -domain example.com -fastcgi true |
|
|
Enables/Disables Perl support. Is |
To enable Perl support on the subdomain sample.example.com: plesk bin subdomain -u sample -domain example.com -perl true |
|
|
Enables/Disables ASP support. Is |
To enable ASP support on the subdomain sample.example.com: plesk bin subdomain -u sample -domain example.com -asp true |
|
|
Enables/Disables Python support. Is |
To enable Python support on the subdomain sample.example.com: plesk bin subdomain -u sample -domain example.com -python true |
|
|
Enables/Disables Miva support. Is |
To enable Miva support on the subdomain sample.example.com: plesk bin subdomain -u sample -domain example.com -miva true |
|
|
Specifies the subdomains to remove or to display information about. Is used in combination with |
To remove subdomains sample.example.com and forum.example.com from the domain example.com: plesk bin subdomain --remove -subdomains sample,forum -domain example.com |
|
|
Enables/Disables SSL support. Set to |
To enable SSL support on the subdomain sample.example.com: plesk bin subdomain -u sample -domain example.com -ssl true |
|
|
Specifies the name of SSl certificate assigned to subdomain if SNi is supported. SNI is supported on the following operating systems:
|
To assign SSL certificate named New Certificate to the subdomain sample.example.com: plesk bin subdomain -u sample -domain example.com -certificate-name "New Certificate" |
|
|
Allows/Prohibits standard email notifications on a subdomain creation (Plesk domain administrators and clients). Used with |
To prevent email notifications about the subdomain creation: plesk bin subdomain --create sample.example.com -notify false |
|
|
Limits the number of HTTP connections. Unlimited is set to |
To limit the maximum number of connections available for the subdomain sample.example.com to 10: plesk bin subdomain -u sample.example.com -max-connections 10 |
|
|
Limits the network usage. Unlimited is set to |
To limit the maximum network use on the subdomain sample.example.com to 500 KB/S: plesk bin subdomain -u example.com -traffic-bandwidth 500 |
|
|
Associates a PHP handler with the site. Specify the handler's identifier (default: |
To set PHP handler on the subdomain to FastCGI: plesk bin subdomain -u sample.example.com -php_handler_id fastcgi |
|
|
Turns on the search engine friendly HTTP 301 redirection. Use ' |
To turn on redirection for the subdomain sample.example.com to www.sample.example.com: plesk bin subdomain -u sample.example.com -seo-redirect www |
|
|
Sets a description for the subscription to be displayed in Plesk. |
To set a description reading "Custom description" for the subdomain sample.example.com: plesk bin subdomain -u sample -domain example.com -description "Custom description" |
|
|
Sets a description for the subscription to be displayed in Plesk to the Administrator. |
To set a description reading "Custom description" for the subdomain sample.example.com: plesk bin subdomain -u sample -domain example.com -admin-description "Custom description" |
|
|
Sets a description for the subscription to be displayed in Plesk to be displayed to a Reseller and the Administrator. |
To set a description reading "Custom description" for the subdomain sample.example.com: plesk bin subdomain -u sample -domain example.com -reseller-description "Custom description" |