Restricted Domain Names

Some users might attempt to create sites with names identical to the domain names of popular online stores and other resources. In such a case, these users will be able to intercept email messages sent by your customers to these domains, because the mail server ensures local delivery. To prevent this, there is a list of predefined domain names that are not allowed to be created on the server.

To manage the list of such domain names, use the following commands (represented by nodes from plesk_server.xsd).

Switching the Restriction On or Off
<packet version="1.6.7.0">
    <server>
        <domain-restriction-enable/>
    </server>
</packet>

<packet version="1.6.7.0">
    <server>
        <domain-restriction-disable/>
    </server>
</packet>
Viewing a List of Restricted Domain Names
<packet version="1.6.7.0">
    <server>
        <domain-restriction-list/>
    </server>
</packet>
Adding a Domain Name to the List
<packet version="1.6.7.0">
    <server>
        <domain-restriction-add>
            <name>domain1.com</name>
        </domain-restriction-add>
        <domain-restriction-add>
            <name>domain2.com</name>
        </domain-restriction-add>
    </server>
</packet>
Renaming a Domain in the List
<packet version="1.6.7.0">
    <server>
        <domain-restriction-rename>
            <name>domain1.com</name>
            <new-name>domain1renamed.com</new-name>
        </domain-restriction-rename>
    </server>
</packet>
Removing a Domain Name from the List
<packet version="1.6.7.0">
    <server>
        <domain-restriction-remove>
            <name>domain1.com</name>
        </domain-restriction-remove>
        <domain-restriction-remove>
            <name>domain2.com</name>
        </domain-restriction-remove>
    </server>
</packet>
 
Request Samples

Setting up apps updates preferences

The following packet turns off force automatic updates for all apps installed on websites within the server, and turns on the automatic updates for newly installed apps:

<packet>
  <server>
    <set>
      <prefs>
        <aps_force_updates>false</aps_force_updates>
        <aps_suggest_updates>true</aps_suggest_updates>
      </prefs>
    </set>
  </server>
</packet>
  
Setting up external SMTP server preferences

The following packet sets preferences for an external SMTP server, allows Plesk to send notifications through this server, and allows hosted scripts to send mail through this server:

<packet>
  <server>
    <set>
      <prefs>
        <mail_notifications>true</mail_notifications>
        <smtp_host>192.168.0.1</smtp_host>
        <smtp_port>25</smtp_port>
        <smtp_login>login</smtp_login>
        <smtp_password>123456</smtp_password>
        <smtp_allow_users>true</smtp_allow_users>
        <smtp_tls>false</smtp_tls>
      </prefs>
    </set>
  </server>
</packet>

  

Setting up various server preferences (Linux)

XML request packets setting up or changing server preferences may look as follows:

<packet>
<server>
<set>
   <prefs>
      <stat_ttl>3</stat_ttl>
      <traffic_accounting>3</traffic_accounting>
      <restart_apache_interval>0</restart_apache_interval>
      <apache_pipelog>true</apache_pipelog>
      <ftp_over_ssl>enabled</ftp_over_ssl>
   </prefs>
</set>
</server>
</packet>

When this operation succeeds, both inbound and outbound traffic will be included to server traffic statistics, which will be stored during 3 months. Also, Apache will not be restarted automatically, piping logs will be enabled, and the Plesk FTP server will allow both secure and non-secure connections from external FTP clients.

  

Setting up various server preferences (Windows)

The following packet specifies that only outbound traffic should be calculated, the traffic statistics should be stored during 5 months, FTP server should allow both FTP and FTPS connections. It also specifies an external SMTP server for sending Plesk notifications and mail generated by users' hosted scripts. Finally, it turns on password protection for site previewing and includes remote SQL Server databases into disk space usage statistics.

<packet>
  <server>
    <set>
      <prefs>
        <stat_ttl>5</stat_ttl>
        <traffic_accounting>2</traffic_accounting>
        <ftp_over_ssl>enabled</ftp_over_ssl>
        <mail_notifications>true</mail_notifications>
        <smtp_host>123.123.123.123</smtp_host>
        <smtp_port>25</smtp_port>
        <smtp_tls>false</smtp_tls>
        <include_remote_databases>true</include_remote_databases>
        <preview_protection>true</preview_protection>
      </prefs>
    </set>
  </server>
</packet>

 

 
Request Samples

For request packets retrieving server preferences, refer to the section Getting Server Information.

  

Response Samples

An XML response packet retrieving server preferences of Plesk for Linux may look as follows:

<packet>
<server>
<get>
   <result>
      <status>ok</status>
      <prefs>
         <stat_ttl>4</stat_ttl>
         <traffic_accounting>3</traffic_accounting>
         <restart_apache_interval>86400</restart_apache_interval>
         <apache_pipelog>true</apache_pipelog>
         <ftp_over_ssl>enabled</ftp_over_ssl>
         <aps_force_updates>false</aps_force_updates>
         <aps_suggest_updates>true</aps_suggest_updates>
      </prefs>
   </result>
</get>
</server>
</packet>

This packet is received from the server where both inbound and outbound traffic is included to server traffic statistics, which is stored for 4 months. Also, Apache is restarted every 24 hours. Apache uses piped logging. The Plesk FTP server allows both FTP and FTPS (using SSL and TLS protocols) connections. APS applications server-wide force updates are turned off, but by default updates are turned off for newly installed apps.

   

An XML response packet retrieving server preferences of Plesk for Windows may look as follows:

<packet>
<server>
<get>
   <result>
      <status>ok</status>
      <prefs>
         <stat_ttl>6</stat_ttl>
         <traffic_accounting>2</traffic_accounting>
         <ftp_over_ssl>required</ftp_over_ssl>
         <mail_notifications>true</mail_notifications>
         <smtp_host>127.0.0.1</smtp_host>
         <smtp_port>25</smtp_port>
         <smtp_tls>false</smtp_tls>
         <aps_force_updates>false</aps_force_updates>
         <aps_suggest_updates>false</aps_suggest_updates>
      </prefs>
   </result>
</get>
</server>
</packet>

This packet is received from the server where only outbound traffic is calculated, and the traffic statistics is stored for 6 months. The local Plesk mail server is used to send notifications and mail generated by scripts, and the Plesk FTP server allows only FTPS (using SSL and TLS protocols) connections. APS applications server-wide force updates are turned off, and by default updates are turned off for newly installed apps.

  

 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.