HostOnNet Blog

Can I block an IP from accessing my website?

Looking for Linux Server Admin or WordPress Expert? We can help.

We can block particular IP address accessing our website.

Login to cPanel and click IP Deny Manager.

cpanel_whm

Under “Add an IP to deny”, please enter IP address or domain name you wish to block.

Click the Add button.

How to unblock the IP address.

Login to cPanel and click IP Deny Manager.

At the bottom, under “Current IP addresses being blocked”, click Remove.

You can also block an IP by coding your .htaccess file


deny from all
allow from 45.123.87.11
allow from 245.123.0.0/12 # country name

About Annie

I've been working in Technical Section for over 10 years in a wide range of tech jobs from Tech Support to Software Testing. I started writing blog for my future reference and useful for all.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.