How to prevent users from creating certain domains – WHM/cPanel

How to prevent users from creating certain domains – WHM/cPanel

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:

root@server [~]# 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.

  • cpanel, Hosting, domain
  • 0 brukere syntes dette svaret var til hjelp
Var dette svaret til hjelp?

Relaterte artikler

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...