ID #168

Can I block certain IP addresses from seeing my website?

Applies to: Grid System

Yes, you can block certain IP addresses from accessing your site by using a Deny directive in an .htaccess file.

Apache's documentation explains how to do this:


For example, if you put the following .htaccess file in a directory, then it would operate on all directories beneath it:

Deny from
Deny From 192.168.55

The 1st Deny directive would block the exact IP address The 2nd Deny directive would block all IP addresses fitting the pattern 192.168.55, including,,, etc.

Last update: 2011-07-11 17:15
Author: FAQ Admin
Revision: 1.2

Digg it! Share on Facebook Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 5 (1 Vote)

completely useless 1 2 3 4 5 most valuable

You can comment this FAQ