Thursday, May 15, 2014

Block IP Address For Website



Blocking a website for a country or city is not an easy task for this first you know the IP address which you want to block. Then after you create a .htaccess text file, no - no this is not any extension for a file it is a name of file it means your text file name is -> .htaccess.txt. Yes you should make this file in notepad, which is available in every system. Then after you write code in your file what I giving below …..

<Files 403.shtml>
order allow,deny
allow from all
</Files>

deny from 1.2.3.4/26
deny from 1.2.3.4
deny from 1.2.3.


  • Here in this example I mentation three example for blocking IP. “Deny from 1.2.3.4/26” means you can deny a range of IP means if you want to deny an IP range you use it here in this exp the IP range is 1.2.3.4 to 1.2.3.26.
  • In the second exp you can deny only one IP and here is the IP is 1.2.3.4.
  • In third exp you can deny a subnet mask of and here are that subnet mask is   deny from 1.2.3.
  • After save this file you have to upload this file on your server in that directory that contains your site.



Now your site is blocked for those IP that you mentation in file.

6 comments:

Kavya Sharma said...

I like your website very much thanks for your share. all the imformation are useful for me,I will come again.Please visit here: Packers And Movers Patna
http://packersmoverspatna.in/packers-and-movers-k-sector-patna

Riya Jain said...

i must say you had done a tremendous job,I appreciate all your efforts.Thanks alot for your writings......Waiting for a new 1..
Packers And Movers Panna
Packers And Movers Raisen

Rita Sharma said...

I loved this one. It has given me courage to try scarier things. I tend to steer clear of them but not anymore. We are expert in Handling,
Packers And Movers in Lucknow
Packers And Movers Lucknow

Purushotam Saini said...

thanks for the great information

Packers and movers in patna@
http://www.transmoving.in/packers-movers-patna.html
Packers and movers in noida@
http://www.transmoving.in/packers-movers-noida.html
Packers and movers in dwarka delhi@
http://www.transmoving.in/packers-movers-dwarka%20delhi.html
Packers and movers in faridabad@
http://www.transmoving.in/packers-movers-faridabad.html

Purushotam Saini said...

Mumbai is the capital city of the Indian state of Maharashtra. It is the most populous city in India. It is one of the most crowded urban regions in the world and the second most populous metropolitan area in India. In Mumbai, many of the peoples come daily to make their life better


Packers and movers in bangalore
Packers and movers in gurgaon
Packers and movers in delhi
Packers and movers in mumbai
Packers and movers in hyderabad
Packers and movers in pune
Packers and movers in chandigarh
Packers and movers in kolkata
Packers and movers in chennai

Faheem said...

avriq.com
avriq.in