The domain_restriction utility is used to manage the list of domain names that are prohibited when users create sites. This prevents users from creating sites with the names identical to the domain names of popular online stores and other resources. Then, these users can receive email messages sent by your customers to these domains, because the mail server ensures local delivery.

Usage

domain_restriction <command> [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
]

Example

The following command adds the domain name example.com to the list of prohibited domain names in Plesk:

plesk bin domain_restriction --add -name example.com

Commands

Command Parameter Description Example
--add or -a   Adds a domain name to the list of prohibited domain names.

To add a domain name example.com to the list of prohibited domain names:

plesk bin domain_restriction --add -name example.com

or

plesk bin domain_restriction -a -name example.com

--add-list   Adds several domain names to the list of prohibited domain names. Used with the -list option.

To add a number of names to the list of prohibited domain names:

plesk bin domain_restriction --add-list -list example1.com,example2.com,example3.com

--remove-list   Removes all domain names from the list of prohibited domain names.

To remove all domain names from the list:

plesk bin domain_restriction --remove-list

--remove or -r   Removes a domain name from the list of prohibited domain names.

To remove the domain name example1.com from the list:

plesk bin domain_restriction --remove -name example1.com

or

plesk bin domain_restriction -r -name example1.com

--rename   Updates a prohibited domain name.

To modify the prohibited domain name example1.com:

plesk bin domain_restriction --rename -name example1.com -new-name example2.com

--enable or -e   Turns on the checking for prohibited domain names.

To enable checking for prohibited domain names server-wide:

plesk bin domain_restriction --enable

--disable or -d   Turns off the checking for prohibited domain names.

To disable checking for prohibited domain names server-wide:

plesk bin domain_restriction --disable

--list or -l   Displays the list of prohibited domain names.

To view the list of prohibited domain names in Plesk:

plesk bin domain_restriction --list

or

plesk bin domain_restriction -l

--help or -h   Displays help on the usage of the utility.

To view help on the use of the domain_restriction utility:

plesk bin domain_restriction --help

or

plesk bin domain_restriction -h

Options

Option Parameter Description Example
-name <domain_name> Specifies a domain name.

To add a domain name example.com to the list of prohibited domain names:

plesk bin domain_restriction --add -name example.com

-new-name <domain_name> Specifies a new name for a domain in the list of prohibited domain names. Used with the --rename command.

To modify the prohibited domain name example1.com:

plesk bin domain_restriction --rename -name example1.com -new-name example2.com

-list <domain_name1>[, <domain_name 2>, ...<domain_name n>] Specifies a list of domain names. Used with the --add-list command.

To add a number of names to the list of prohibited domain names:

plesk bin domain_restriction --add-list -list example1.com,example2.com,example3.com