Blocking an IP from your Website
This demo will show you how to block an IP from your Website through your cPanel. The ability to deny an IP address access to your site allows webmasters greater control over the security of their site. IP blocking could be useful for:
- Blocking IPs where past security attacks have originated from
- Banning unwanted visitors
- Blocking email harvesters
Once blocked, visitors (or robots) originating from a blocked IP will not be sent any pages, images, or files from your account.
[1] Locate and click the "IP Deny Manager" icon under the "Security" section of your cPanel
[2] Enter the IP address you wish to block in the "IP Address or Domain" field
[3] Click the "Add" button to block the IP address from accessing your website
How it Works
cPanel allows you to block IP addresses by adding the following line to the .htaccess files located within your directory:
deny from IPADDRESS
replacing IPADDRESS with the actual IP address you specified in the "IP Address or Domain" field. We blocked the IP 255.255.255.255 in the video demo, so the line that was added to the .htaccess files located in our example account's directory was:
deny from 255.255.255.255