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 70.24.291.52
allow from 216.130.49.223 #my house

Article Comments

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

HostGator
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.

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

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

HostGator
Please email support@hostgator.com for help with your question.

GHAZ
Dear hostgator i want to block a specific ip adress from my website http://www.enjoymp3.co.cc ... but i couldn't find any ip adresses in latest visitors.. please suggest me how i can do that

thanks

HostGator
Take a look at http://support.hostgator.com/articles/getting-started/general-help/apache-mod_rewrite-and-examples

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

Walter
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?

HostGator
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