We care about the Environment

CyberPanel | Error message: Blacklisted domain.

When I was trying to create a website account with CyberPanel, I got this Error message: Blacklisted domain.

Error message: Blacklisted domain.

I thought my domain was blacklisted, so I went on a search on the domain blacklist checker to check if the new domain that I just purchased is blacklisted.
However, the records are clean, even after checking on multiple domain blacklist checkers it still turns out clean.
This got me frustrated until I found out that Cyberpanel has a line of code that prevents the domain from being the same as the server's hostname.

BlackList = [ socket.gethostname(), '', '', '', '', 'localhost', '', '','', '', '', '', '', '','', '', '', '', '', '', 'localhost.localdomain','localhost4.localdomain4', 'localhost6.localdomain6','', '', '','', '', '', '', '', '']

The culprit, in this case, is socket.gethostname(). This line will prevent your server's hostname to be used as a website account.

Option 1

To get this fixed, simply delete socket.gethostname() from which is located in this directory.

If it is on a different directory, you can search it with this line of command.
find . -name ''

Alternatively, you can also use this one line code to get this fixed. ( Make sure your CyberPanel's location is in the same directory )
sed -i 's/socket.gethostname(), //' /usr/local/CyberCP/plogical/

Option 2
You can also get this fixed by changing the hostname of your server.
To change your server's hostname, use this command
hostname <new_hostname_here>

After changing your server's hostname, restart your CyberPanel
systemctl restart lscpd

There is also a video made by a CyberPanel developer regarding this, take a look at his video

After completing either of those steps, try creating your website account again.

Get your new FREE CyberPanel with Evoxt's CyberPanel One-Click Installation now!