Denying Access To Specific IP Addresses Print

  • 79

Denying Access To Specific IP Addresses


You can use the your web statistics tool to find specific visitor IP addresses. 



Blocking An IP Address

    1. Log in to cPanel.
    2. Scroll down to the "Security" section, and click "IP Blocker".
    3. Enter the domain or IP address you would like to block underneath "Add an IP or Range"
    4. Click "Add".



Unblocking An IP Address

    1. Log in to cPanel.
    2. Scroll down to the "Security" section, and click "IP Blocker".
    3. Find the IP that you wish to unblock underneath "Currently-Blocked IP Addresses".
    4. Click "Delete".
    5. To confirm, click "Remove IP".



Deny All

It is also possible to deny all traffic. This is done via the .htaccess file. The command to deny all incoming traffic is "deny from all". You must add exceptions for anyone you wish to be able to see the site, even yourself. To allow specific IP addresses, the command is "allow from xxx.xxx.xxx.xxx" where the xxx.xxx.xxx.xxx is replaced with the IP address you wish to allow access. It is a good idea to add comments to explain what the allowed IP exceptions are, such as "#home" or "#work".



Was this answer helpful?

« Back