There was a problem loading the comments.

How to Deny an IP or Domain in cPanel

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

The steps below will allow you to cancel visitor access from a specific IP Address or Domain Name.

The simplest way would be to just do it through your cPanel.

You can also do it by editing your .htaccess file in the directory you are working in.

Deny an IP using cPanel

1. Login to your 'cPanel'.


2. Under "
Security", go to "IP Blocker" under Security.

3. Under 'Add an IP Deny:' enter the IP address or Domain name you wish to block from accessing your site.

4. Click 'Add'.

Deny an IP using .htaccess file

Add the coding below into your .htaccess file:

order allow,deny

deny from 210.112.10.220

deny from .domain.com

allow from all

The first line tells the .htaccess what you want to specify. The second and third line would cancel a single, specific IP or Domain name. The fourth line allows access to everyone else.

If a banned visitor tries to access the specified location (where the .htaccess file is located) they will be seeing the 403 Forbidden Access Error Page.

NOTE :

To remove the IP banning, all you need to do is remove the string it created in your .htaccess file or select it from the drop down menu on the IP Deny Manager page.


Share via
Did you find this article useful?  

Related Articles

© ServerFreak Technologies Sdn Bhd