Support Center » Knowledgebase » Unix Tips » Denying Access to an IP Address (Unix)

Denying Access to an IP Address (Unix)

You can deny access to a certain IP Address from browsing your web site, for example if you know someone/something has been flooding your site with useless requests or slurping all your site's content.

This tip applies only to Unix hosting accounts using Apache as the web server.

Place a file called .htaccess into your web directory and add the following line into the file:

For Apache 2.4 server:

<IfModule authz_core_module>
Require all granted
Require not ip

For Apache 2.2 server:

<IfModule !authz_core_module>
Order Deny,Allow
Deny from

Where is the IP address that you wish to block. The IP Address can be in the format Make sure you are not blocking things unnecessarily.

For further information see:

Apache 2.4:

Apache 2.2:

Article Details
Article ID: 60
Created On: 03 Sep 2003 05:00 AM
 Login [Lost Password] 
Remember Me:
Please note that the login and password to the support area is NOT the same as your hosting control panel login and password
 Article Options
Home | Register | Submit a Ticket | Knowledgebase | Downloads | Control Panel User's Guide | Server Status