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 facebook.com, google.com, gmail.com 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.
Example:[email protected] [~]# cat /usr/local/cpanel/etc/commondomains google.com gmail.com hotmail.com aol.com yahoo.com excite.com cs.com juno.com mail.com email.com address.com altavista.net netscape.net netscape.com earthlink.net attracta.com
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. 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.
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?
If database is not showing in cpanel, make sure database exists in the server. If it exists, make...
We have sometime receive clients complain of server not reachable, while their IP are blocked by...
In the steps below I'll show how to locate the top scripts on your server sending mail. If any...
People with unoptimized database always face slow website response and performance. Below are the...
If you need to create a .htaccess file, you can use your control panel's file manager.Using the...