Ban IP Address from your website using .htaccess


Some people has their own reasons for banning certain IP Address from accessing their websites.
Some because they want to single out an individual or certain organisation from browing their websites and some one to protect their website from excessing crawling from bad bots or any other form of bot attacks.

Whatever the reasons are, you can ban IP Address from accessing your websites by using Apache .htaccess file.

What you need to do is create add these lines to your .htaccess file and upload it to your web server directory.

Don’t forget to replace xxx with the IP Address that you want to ban.


order allow,deny
deny from xxx.xxx.xxx.xxx
deny from xxx.xxx.xxx.xxx
allow from all

Tags: , , ,

Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • co.mments
  • del.icio.us
  • digg
  • Furl
  • Ma.gnolia
  • NewsVine
  • Reddit
  • Spurl
  • TailRank
  • YahooMyWeb

Recommended Reading

Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.


Other Posts
Wordpress Source Code Syntax Plugin
Get Latest Currency Exchange rate from Foxrate.org : XML-RPC

Write a Comment

Take a moment to comment and tell us what you think. Some basic HTML is allowed for formatting.

Reader Comments

Thanks alot for this, that’ll stop my articles being ripped by some idiot who hotlinks my entire blog. Thanks again

Kramer auto Pingback[...] then, edit the file writing the ip address u wanna ban http://tipvista.com/2007/02/ban-ip-address-from-your-website-using-htaccess/ [...]

Thaaaaank you!!! A stupid kid spamed my guestbokk all the time before i banned him.
Thanks!

[...] http://tipvista.com/2007/02/ban-ip-address-from-your-website-using-htaccess/ Related PostsGetting started with awstats [...]

Kramer auto Pingback[...] [...]