How do I deny IP address access?

Do you want to stop someone from visiting your website? This tool will block anyone from a specified IP address.

How to find out a visitor's IP address. Use the web statistics tools to find more information on your visitors. We suggest you go to cPanel and click the Latest Visitors icon. Look for the Host information; it could be an IP or a domain name.

How to block the IP address.

  1. Login to cPanel and click IP Deny Manager.
  2. Under "Add an IP to deny", please enter IP address or domain name you wish to block.
  3. Click the Add button.

How to unblock the IP address.
  1. Login to cPanel and click IP Deny Manager.
  2. At the bottom, under "Current IP addresses being blocked", click Remove.

You can also set an option for deny from all, which will deny everyone.

This must be done by coding your .htaccess file as follows:
deny from all
allow from
allow from #my house

Article Comments

Michael Thrasher
How do I block an IP from all sites under my reseller hosting?

You will need to do this for each cPanel, individually.

Jim Carroll
Can I change the 403 message?
I would like to add...

Permission to access the site will be restored after you call 800-xxx-xxxx and explain your recent activities on the site.

Yes, read the related article called "Custom error pages".

How can I deny a direct access to IP address -> opens currently the root, which should be only accessible via URL. I am using a dedicated server on HostGator

Please email for help with your question.

Dear hostgator i want to block a specific ip adress from my website ... but i couldn't find any ip adresses in latest visitors.. please suggest me how i can do that


Take a look at

Use the last example for "Block traffic from multiple referrers".

In my hostgator IP deny manager. I have three instances of :

Server Setting: All | Beginning IP: All - Ending IP: All.

I don't know how long it's been that way, I've had this account for years and that's the first time I've looked in the IP deny mananger. Try to delete it looks successul, but I when I "Go Back" - all three are still there. All of the sites on the account work. Is this a problem?

This is normal. That is just how it looks in cPanel.

Your comments help us keep the knowledge base updated. This is not a medium for support. If you have questions or need help, please contact us via email, phone or live chat for fast assistance.

Post Comment