How to Prevent cPanel Users from Creating Certain Domains

How to Prevent cPanel Users from Creating Certain Domains

To add to the list of domains that WHM denies to users, perform the following steps:

  1. From the command line, run the cat /usr/local/cpanel/etc/commondomains command to view the default list of domains that WHM does not allow users to create.

    • If the file contains a large number of entries, run the grep 'domain' /usr/local/cpanel/etc/commondomains command to determine whether the domain domain exists in the list.

      Warning:

      Do not edit this file directly. System updates overwrite any changes to this file. Instead, follow the next step to create a new file.

  2. With a text editor, add the domains that you do not want WHM to create to the /var/cpanel/commondomains file.
    • Add each domain on a separate line, and do not prepend or append a dot to each domain name. For example:

      1
      2
      3
      4
      a.com
      b.com
      c.com
      d.com
    • Only add domain names to this file (for example, example.com). When you list a domain name, WHM will automatically prevent the creation of subdomains for that domain. For example, if you list the example.com domain, users also cannot create the sub.example.com domain.

  3. In the Domains section of WHM's Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings), set the Prevent cPanel users from creating specific domains setting to On.
  • cPanel, WHM
  • 0 Uživatelům pomohlo
Byla tato odpověď nápomocná?

Související články

DNS Management - How To Edit MX Records

DNS Management - How To Edit MX Records A mail exchanger (MX) record is a type of DNS record...

Cpanel Exim How To Clear The Mail Queue

  Cpanel Exim How To Clear The Mail Queue Here’s the proper way to clear the exim mail...

Creating a cPanel User Account

Creating a cPanel User Account To create a new account go toWHM >> Account Functions...

How can I limit access to certain directories on my server by requiring a password using cPanel/WHM?

How can I limit access to certain directories on my server by requiring a password using...

How do I backup my entire site in Cpanel?

How do I backup my entire site in Cpanel? Entire accounts can be backed up by doing the...