How do I block an IP address from accessing my site?

In order to block a certain IP Address from access to your site you can add the following to the htaccess file in your web server document root ( most often named public_html, httpdocs, or webdocs) directory (edit to make the below IP the offender’s):

<Limit GET>
order deny,allow
deny from 209.23.123.110
</Limit>

This will block access to your main pages, and all pages in all subdirectories. To block them from seeing only one, or some subdirectories, place the .htaccess directives above in the highest subdirectory that you want blocked.

If you enjoyed this post please consider sharing ! :)



Subscribe in a reader

Related Posts

This post was written by...

– who has written 733 posts on Computer Tips.

Hi guys…I am a computer freak but I do not always talk in tech language. Hope you enjoy my website and learn everything you need to know in an easy to understand way.. If you like what you see please join: Follow Tips4pc On Twitter | Become A Facebook Fan | Subscribe RSS Feed | Tips4pc Youtube Channel

Contact the author

Leave a Comment

Please use your REAL NAME@KEYWORDS or just your REAL NAME to get approved. No links in the comment plz! Spam comments will be deleted so don't waste your time!

Previous post:

Next post: