Stopping cPanel Users From Configuring Certain Domains
Posted by Allura on 02 11 2018.
The cPanel users are denied the ability to create certain domains by cPanel and WHM. In many ways this feature proves a great usage, for example, they deny the users of cPanel to exercise their ability to park a leading domain (such a google.com) on top of a domain.
Information about the domains that can be created by the cPanel users is there in the Aliases and Adon documentation.
Add To The List Of User-denied Domains
There are certain steps to add to the domain list that is denied to the users by WHM.
- One needs to run the cat usr/local/cpanel/etc/commondomains command from the command line to view the default domains list that WHM prevents the users to create.
- If the file has in it a large number of entries, then one needs to run the grep ‘domain’ /usr/local/cpanel/etc/commondomains command so as to determine the existence of domain domain in the list.
As a warning it can be said that there is no need to edit this file directly. System, here, updates overwrite any changes to this file. Instead of editing, one can follow the next step to create a new file.
- One can add the domains which they do not want WHM to create to the /var/cpanel/commondomains file with the help of a text editor.
- For this, one needs to add each domain on a different line, and does not prepend or append a dot to each domain name, like,
- Next, one needs to add domain names only to the file (as for example: com). WHM automatically debars the creation of subdomains for that domain when one lists a domain name. For example: if one list the example.com domain, then users also cannot create the sub.example.com domain.
- Lastly, one can set the Prevent cPanel users from creating specific domains setting to On in the Domains section of WHM’s Treak Settings interface (WHM >> Home >> Service Configuration >> Treak Settings).
There is a chance that users of cPanel can create Subdomains on top of a domain. To stop this creation, there are various technical steps that one must follow for proper working.