Preventing cPanel Users from Creating Certain Domains

For WHM version 11.38

cPanel & WHM allows you to prevent cPanel users from creating certain domains. You can do this using the WHM Tweak Settings option labeled Prevent cPanel users from creating specific domains. To learn more about domains cPanel users can create, read our documentation about parked domains and addon domains.

This feature is useful, for example, if you wish to prevent cPanel users from attempting to park a well-known domain (such as google.com) onto his or her own domain.

You can add to the list of domains to which WHM applies this feature:

  1. To see which domains WHM already blocks, view the file /usr/local/cpanel/etc/commondomains.
  2. Create the file /var/cpanel/commondomains.
  3. In /var/cpanel/commondomains, list the domains you wish to prevent cPanel users from creating.
    • You must separate domains with a newline.
    • PICK Important: You should only list domain names in /usr/local/cpanel/etc/commondomains (e.g. example.com). Listing a domain name will automatically prevent the creation of subdomains for the specified domain. For example, listing example.com will prevent users from creating sub.example.com. In addition, domains listed in this file should not contain a leading dot.
  4. Make sure that, on the Tweak Settings screen, Prevent cPanel users from creating specific domains is turned On.

Image of Prevent cPanel users from creating specific domains

The WHM Tweak Settings option that prevents users from creating certain domains

Topic revision: r5 - 25 Jan 2013 - 17:07:48 - Main.LaurenceSimon