Htaccess is the default configuration file that manages your web server and its quite a very important file to be kept safer. I am not gonna teach you how to protect, rather a little information on how to restrict a set of IP (Internet Protocol) from accessing your blog. There are two important things that comes in my mind to restrict IP’s. At first to prevent someone’s IP whom you find suspicious and then to prevent spam comments that comes from a series of IP. Since I found these two points pretty important, I though its better to write about it.
Before getting into the tutorial take a backup of your .htaccess file. You can find the file placed in the file manager of your domain.
Restrict Multiple IP Address
order deny,allow
deny from 12.23.34.56
deny from 45.67.78.90
allow from all
Follow the same process if you want to deny single IP address.
Since most of us are not using static IP’s and hence its better to deny a series of IP. So follow the step below to prevent a series of IP’s accessing our blog or website.
Restrict a series of IP address
order deny,allow
deny from 23.45.56
allow from all
Note : While using the above code DON’T leave white space after comma.








Great post Franklin. I have not practice with IP address, but this post has taught me a lot. Thanks for sharing it.
This is Really Good Franks! Since i Made my Blog Do-Follow, i Get Lost of Spam Comments, By this method i can Reduce the the SPAM Comments! Thanks For Sharing this!
.-= Karthikeyan´s last blog ..Google BUZZ – New Comment and Like Tabs Feature =-.
@Nicola – You can try its very easy to implement.
@Karthi – Yes you can reduce spam comments to some extent.
Pingback: Tweets that mention How To Restrict A Series Of IP Address Using .htaccess | Bloggermint -- Topsy.com
Pingback: How To Restrict A Series Of IP Address Using .htaccess | Bloggermint | IP address.co.uk
Pingback: SEO IP Class | SEO Services | SEO Traffic Spider | SEM
Nice work Franklin…..thanks for sharing.