Page is a not externally linkable
- Hardware and OS Related Technologies
-- Website Technology Issues
---- Blocking Site For A Country


lucy24 - 12:47 am on May 20, 2012 (gmt 0)


IP address ranges are not assigned by country, so any large range probably has smaller sub-ranges within it from a variety of different countries. That is, if you see an IP address from your banned country, you can't block all IPs starting with similar digits, because you'll probably be banning visitors from other countries, too.

And how! Currently about 2/3 of the "Deny from..." section of my htaccess is devoted to The Unwanted Country-- and that's nowhere near a complete list. To keep things sane I cut off at /16 (that is, aa.bb) unless I meet an individual nasty in a smaller range. If I included everything, the list would be more than twice as long.

You could throw in a language block. But unless you're locking out a major European country-- somehow I doubt this is what you want to do-- the language probably won't even show up in the UA.


Thread source:: http://www.webmasterworld.com/website_technology/4455241.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com