How to prevent users from creating certain domains?

The control panel WHM & cPanel allows you to prevent cPanel users from creating certain domains. Which means, to prevent users to create well-known common domains as PARKED or ADDON to the existing account. It’s a serious issue by considering the Spamming or other related suspicious activities which are usual in shared hosting accounts.

Consider one case, if you have a shared hosting account and one of your cPanel user may be using his account to send Spam emails or for other malicious activities from his parked or addon domain with the actual account. In this case, you must have an idea to prevent this from well-known and common domains such as,, etc. You can prevent this from the Tweak settings of your WHM control panel.

By-default the WHM/cPanel blocks a list of domains, to see the domains WHM already blocks, view the file /usr/local/cpanel/etc/commondomains.


[email protected] [~]# cat /usr/local/cpanel/etc/commondomains

Steps to prevent user’s from creating certain domains

Step I : SSH to server as root.
Step II : Create the file /var/cpanel/commondomains.
In /var/cpanel/commondomains, list the domains you wish to prevent cPanel users from creating.
You must separate domains with a newline.

Important: You should only list domain names in /usr/local/cpanel/etc/commondomains(e.g. Listing a domain name will automatically prevent the creation of subdomains for the specified domain. For example, listing will prevent users from creating In addition, domains listed in this file should not contain a leading dot.

Step III : Make sure that, on the Tweak Settings screen, Prevent cPanel users from creating specific domains is turned ON.

See the attached image for more clarification.



Was this answer helpful?

 Print this Article

Also Read

MySQL database not showing in cPanel

If database is not showing in cpanel, make sure database exists in the server. If it exists, make...

Unable to see my website

We have sometime receive clients complain of server not reachable, while their IP are blocked by...

Find spam script location with Exim - VPS / Dedicated Server

In the steps below I'll show how to locate the top scripts on your server sending mail. If any...

How to Repair and Optimize Database for Website performance?

People with unoptimized database always face slow website response and performance. Below are the...

Redirect HTTP TO HTTPS Automatically

If you need to create a .htaccess file, you can use your control panel's file manager.Using the...