You can find our user documentation at

Check out our new API beta site!

Child pages
  • The proxydomains Script
For cPanel & WHM version 74

Skip to end of metadata
Go to start of metadata


The /usr/local/cpanel/scripts/proxydomains script allows you to create proxy domain Domain Name System (DNS) records for a cPanel, WHM, or Webmail account from the command line.

This script adds the required DNS records for the subdomains to the main domain's records, but does  not create a VirtualHost entry in the /usr/local/apache/conf/httpd.conf file.


This script only adds or removes the DNS entries for proxy subdomains.

  • By default, WHM automatically creates proxy subdomains for new users. To prevent this, you must disable the Proxy subdomain creation setting in the Domains section of WHM's Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings).
  • To disable proxy subdomains that already exist, you must override the current proxy subdomain. For example, redirect the subdomain to the domain.


You cannot add the cpanel, whm, or webmail proxy subdomains for addon or parked domains (aliases). You can only add cpcontacts, cpcalendar, and webdisk proxy subomains to addon and parked domains (aliases).

Run the /scripts/proxydomains script

To run the /usr/local/cpanel/scripts/proxydomains script from the command line as the root user, use the following format:

/usr/local/cpanel/scripts/proxydomains [action] [options]


You can use either of the following actions:

addCreate a proxy subdomain.

Remove a proxy subdomain.



  • If you do not specify a user, this script attempts to configure the DNS records for every proxy subdomain on every cPanel account on the server.
  • If you specify a user but you do not specify a domain, this script attempts to configure the DNS records for every proxy subdomain on the user's account.

The following table lists the options that you can pass with this script:


The account for which to configure the user's domains.


The domains to configure.

The proxy subdomain that you wish to configure.


If you do not specify a subdomain, the script adds or removes DNS records for the following subdomains:



Whether to enable the replacement of existing records.


  • Always pass 0 as this option's value.
  • Only use this option to change Autodiscover hosts.


The Autodiscover host that you previously configured.
Whether the script should function as though you enabled Autodiscover support, even if you disabled it.



  • Always pass 1 as the value for this option.
  • Only use this option to remove the domain's Autodiscovery proxy subdomains after you disable their support.


Only perform the operation if proxy subdomains are enabled.



For example, to add the proxy subdomain for the cPanel user john, run the following command:

/usr/local/cpanel/scripts/proxydomains add --user=john --subdomain=webdisk --no_replace=0 --force_autodiscover_support=1 --ifenabled

The output resembles the following example:

Adding proxy subdomains for user john.


The options that you pass to the command determine its output.

Additional records

The /usr/local/cpanel/scripts/proxydomains script adds additional entries to the DNS records if you enable the Thunderbird and Outlook autodiscover and autoconfig support (enables proxy subdomain and SRV record creation) setting to in the Domains  section of WHM's Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings). When you enable this setting , this script also adds the following entries:

Record typeEntry
A records
  • autoconfig 
  • autodiscover
SRV and TXT records
  • _caldav._tcp
  • _caldavs._tcp
  • _carddav._tcp
  • _carddavs._tcp
SRV records


Additional documentation

There is no content with the specified labels

Error rendering macro 'contentbylabel'

parameters should not be empty

There is no content with the specified labels