Welcome to WebmasterWorld Guest from 50.16.112.199

Forum Moderators: phranque

Blocking a city or a state in USA

How do you block a city from visiting your website?

   
6:01 am on Dec 12, 2008 (gmt 0)

5+ Year Member



Is there a way to block visitors from a city, specifically Rockville, Maryland without affecting entire Maryland and USA? I mean only IP addresses coming from Rockville only. I know it can't be blocked 100% but at least i need to block them.

If so, how can this be done?

6:09 am on Dec 12, 2008 (gmt 0)

5+ Year Member



OK, I think I'll have to block entire Maryland so how can I block Maryland ip addresses from visiting website?
7:34 am on Dec 12, 2008 (gmt 0)

10+ Year Member



MaxMind has IP databases that can give you the country and city of origin for a given IP. They have free (geolite city) and paid (geoip city) versions, the latter is more accurate of course.
I use their free country database so I don't know whether the city version also provide the state. If not you should search that DB for all places in Maryland.
10:56 am on Dec 12, 2008 (gmt 0)

5+ Year Member



I browsed in MaxMind website but I can't find any free country database to search for a list of IP addresses.
11:17 am on Dec 12, 2008 (gmt 0)

10+ Year Member



Google: maxmind geolite country
or Google: maxmind geolite city
The first results should get you there and then you have several options for downloading the database, either in CSV format to store in e.g. a MySql database or in a binary format for which an API is provided.
12:48 am on Dec 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you are trying to prevent a competitor from seeing your site they can still view it via Google's cache.
12:58 am on Dec 13, 2008 (gmt 0)

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member



User-from: 20847, 20848, 20849, 20850, 20851, 20852, 20853, 20857
Disallow: /

If only it were that simple, huh? :)

2:39 pm on Dec 14, 2008 (gmt 0)

5+ Year Member



killua, curious to the intent... what's up?
5:14 pm on Dec 14, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Check to see if maybe there is a static IP number and maybe block that if needed. You can block certain IPs / Class C on IIS which might be effective.

Keep in mind though if the user has another provider - like AOL, you might not be able to block him effectively

7:37 pm on Dec 14, 2008 (gmt 0)

WebmasterWorld Administrator buckworks is a WebmasterWorld Top Contributor of All Time 10+ Year Member



they can still view it via Google's cache

Only if you've allowed Google to cache your site.

3:16 am on Dec 15, 2008 (gmt 0)

5+ Year Member



Didn't know that it was this difficult. I have no experience in database MySql whatsoever.

The reason why I want to block Maryland only in USA is because there's a group of people there whom I don't want them to visit.

Anyway, I failed.

12:18 am on Feb 22, 2009 (gmt 0)

10+ Year Member



You can refer to the following article for redirection using the IP2Location.

[ip2location.com...]

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month