How to block unwanted traffic to your website from specific IPs via the xneelo Control Panel

The information in this article is related to the new xneelo Control Panel.
If you are still using konsoleH, refer to this article.

It’s possible to block malicious or unwanted traffic from specific IP addresses or a range of IPs by adding a small code snippet to your website’s .htaccess file.

The .htaccess file is located in the public_html directory of your website. 

This file can be accessed and edited in various ways, including FTP and SSH. Here we will access it via the File Manager in the xneelo Control Panel. 

No coding or experience is required – just follow the steps below to block IPs using .htaccess.

Steps

  • 1
    Log in to the xneelo Control Panel.
  • 2
    Select a Product (e.g. Web Hosting) from the side menu. 
  • 3
    Select or search for the specific domain name. 
  • 4
    Under Hosting tools, select File Manager. The files within the public_html folder are immediately visible – these are website files and include the .htacess file that governs your whole site.
  • 5
    Select the 3 dots menu to the right of the .htaccess file.
  • 6
    Select File editor.
  • 7
    Insert the following code snippet at the beginning or end of any existing code that is already in the text file, replacing the sample IPs in the snippet with those that you want to block. Any number of IPs can be listed. Then click Save.
    order allow,deny
    deny from 123.456.789.01
    deny from 12.123.456.78
    deny from 234.56.789.123
    allow from all
Assist Note

Should you wish to block traffic to your website from a particular region, you can make use of IP2Location API.

Assist Tip

Cloudbric WAF, the security service offered by xneelo, provides a user-friendly dashboard to easily block IPs or entire countries.