domalias: Domain Aliases
The domalias
utility is used to manage domain aliases through CLI.
By using this utility, you can perform the following tasks:
- creating or deleting domain aliases
- viewing the information about domain aliases
- enabling and disabling Web, Tomcat, and mail services on domain aliases
Usage
domalias <command> [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
]
Example
The following command creates domain alias example.net for the domain example.com, enables the domain alias, and enables mail service on the domain alias.
plesk bin domalias --create example.net -domain example.com -status enabled -mail true
Commands
Command | Parameter | Description | Example |
---|---|---|---|
--create or -c
|
<alias_name> |
Creates a new domain alias. Requires |
To create a domain alias example.net for the domain example.com: plesk bin domalias --create example.net -domain example.com or plesk bin domalias -c example.net -domain example.com |
--update or -u
|
<alias_name> |
Updates configuration of an existing domain alias with the data specified in the options. |
To enable mail service on the domain alias example.net: plesk bin domalias --update example.net -mail true or plesk bin domalias -u example.net -mail true |
--delete or -d
|
<alias_name> |
Deletes a domain alias. |
To delete the domain alias example.net: plesk bin domalias --delete example.net or plesk bin domalias -d example.net |
--delete-all or -da
|
<domain_name> |
Deletes all domain aliases for the specified domain. |
To delete all domain aliases for the domain example.com: plesk bin domalias --delete-all example.com or plesk bin domalias -da example.com |
--info or -i
|
<alias_name> |
Displays information about a domain alias. |
To view information about the domain alias example.net: plesk bin domalias --info example.net or plesk bin domalias -i example.net |
--on |
<alias_name> |
Enables a domain alias. |
To enable domain alias example.net: plesk bin domalias --on example.net |
--off |
<alias_name> |
Disables a domain alias. |
To disable domain alias example.net: plesk bin domalias --off example.net |
--rename or -r
|
<alias_name> |
Renames a domain alias. Requires |
To rename the domain alias from example.net to example.org: plesk bin domalias --rename example.net -new-name example.org or plesk bin domalias -r example.net -new-name example.org |
--help or -h
|
<alias_name> |
Displays help on the use of the utility. |
To view help on the use of this utility: plesk bin domalias --help or plesk bin domalias -h |
Options
Option | Parameter | Description | Example |
---|---|---|---|
-new-name |
<FQDN> |
Sets a new name for an existing domain alias Required with |
To rename the domain alias from example.net to example.org: plesk bin domalias -r example.net -new-name example.org |
-mail |
true|false |
Enables/Disables mail service on a domain alias. Is |
To disable mail service on the domain alias example.net: plesk bin domalias -u example.net -mail false |
-web |
true|false |
Enables/Disables web service on a domain alias. Is |
To disable web service on the domain alias example.net: plesk bin domalias -u example.net -web false |
-domain |
<FQDN> |
Specifies the name of the domain for which domain alias is to be created. Required with |
To create a domain alias example.net for the domain example.com plesk bin domalias -c example.net -domain example.com |
-status |
enabled|disabled |
Enables/Disables domain alias. Is |
To disable domain alias example.net: plesk bin domalias -u example.net -status disabled |
-tomcat |
true|false |
Enables/Disables the Tomcat service on a domain alias. Is |
To enable the Tomcat service on the domain alias example.net: plesk bin domalias -u example.net -tomcat true |
-seo-redirect |
non-www|www|none |
Turns on the search engine friendly HTTP 301 redirection. Use
‘non-www ’ to redirect from www.domain to domain ,
‘www ’ to redirect from domain to www.domain , and
‘none ’ to turn off the redirection (default: non-www ). |
To turn on redirection for the domain alias example-alias.com to www.example.com: plesk bin subscription -u example-alias.com -seo-redirect www To turn on redirection for the domain alias example-alias.com to example.com: plesk bin subscription -u example-alias.com -seo-redirect non-www |
-dns |
true|false |
Enables/Disables DNS zone on a domain alias. |
To enable the DNS zone on the domain alias example.net: plesk bin domalias -u example.net -dns true |