Geolocation by IP Address

Determining geographic locations based on Internet IP offers localization services and brings together user communities without the need for GPS receivers or complicated configuration switching.
Where Are You Located?

Now that we've explained some of the techniques that can be used in geolocating Internet users by their IP addresses, we offer you a chance to try it out. Point your Web browser of choice here, and see how accurate or inaccurate the current results are. Please leave comments below about the accuracy of your results as well as any ideas you may have.

Andrew Turner is an aerospace engineer and currently is developing vehicle simulation software for Realtime Technologies, Inc., in Royal Oak, Michigan. When he's not busy developing software tools for work and play, he's apt to be scuba diving, curling or separating his cat and dog. He can be contacted at



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Pointing in the wrong direction

Anonymous's picture

Let's not go overboard with the "We are being controlled by our technology" speech.

It is not technology which is foisting the Japanese text on you, but a person who decided it would be a good idea to use geolocation by IP, instead of the user's settings. It is a misapplication of technology. People do that. Technology doesn't apply itself, even when it appears to be automagic.

Geo-IP Location in the Travel Industry

James D Semple's picture

Hi Everyone, I've implemented a solution from MaxMind's free database and added some of my own data/testing also. I think this will work nice for the travel market, since usually a person travelling cares about a metropolitan area rather than a rural town in most cases, heck they may even be lost in a rural town or need to find out what's going on in the big city. A buddy of mine is in Europe now (currently Austria) and tested it out, he said he was in Villach and it pointed him to Vienna instead. A few friends back home in Canada here are being pointed to Toronto (we're outside Toronto) I'm guessing with DSL it goes to Toronto's server. Some point correctly to their city, some not. I expect as the site grows to accept user input as to their location and for people to offer up where they were (it would be nice if everyone had a static ip!) I hope to correct the database to 99.9% reliability someday, but that seems a little unrealistic since like many mentioned some ISPs are not located in the same city irregardless. Check it out where did it send you? You can contact me on MSN if you like what I'm doing and want to talk.

Check out

Anonymous's picture

Check out this:

The example does what the article is talking about.

Better URL for testing

R. Scott Perry's picture

The old URL to test geolocation no longer works. You may want to point people to instead.

Geolocation URL restored

Andy Turner's picture

The link has been restored. It was accidentally moved during a site upgrade. My apologies.

Localisation and You (John Robinson at 1341 Crescent Dr....)

Anonymous's picture

Besides the worrying implications for privacy, I strongly believe on principle that you should not know my true IP nor be able to trace it to a specific geographical location. Geolocation by IP is a prime example of modern software trying so hard to be "smart" that it ends up dumb. My browser (like almost all browsers) will explicitly identify the preferred language and region of my system based upon user-defined choices on the OS-level, and yet, sites like will insist on trying to "guess" my language/country based upon my IP, which is highly variable. Not that I entirely agree with browsers leaking that information in the first place, but it makes much more sense to base the rendering/forwarding of a webpage on OS-level user-defined choices than on a systems guesses based upon IP, especially for those with proxied systems. I do not just dislike modern localisation technologies, I oppose them unreservedly, along with all they represent.

Localisation and You (John Robinson at 1341 Crescent Dr....)

Anonymous's picture

Besides the worrying implications for closed meeting, I strongly pretend on familiarization that you have need to not transmission my offbeat IP nor be able to trace it to a remedy geographical location. Geolocation by IP is a prime example of late software counteractive so close to be "smart" that it ends up duncical. My browser (nonresisting almost all browsers) you name it explicitly identify the preferred language and region of my unify damnabled inlet user-defined choices on the OS-level, and yet, sites nothing loath with total dedication avow on fatiguesome to "fortune-tell" my language/country chemicald make an overture my IP, which is well variable. Not that I entirely acquiesce in with browsers leaking that control signals in the essential chaussee, but it makes much more splash to alloisomer the rendering/forwarding of a webpage on OS-level user-defined choices excepting on a unifys hold ases below contemptd gather IP, remarkably for those with proxied toss togethers. I do not apt dissilver-voiced modish localisation technologies, I oppose them unreservedly, along with all it evidence.

Re:Localisation and You

Sesso Incontri's picture

From geobytes faq "To achieve this we acquire seed data from a number of
sources. All of these sites ask the web surfer to provide their
geographic location, and this location along with the user's IP Address
is forwarded to us as seed data. We then run this data through a series
of algorithms which identify and extract collaborating seed points."

So the process in reverse is a little bit like the RIR whois which
correlates an IP with a provider netblock, except for geo the IP is
correlated with a much more finely granular block or group of IPs
corresponding to a little geographic area.

Incorrect geolocation determination

Pat Plaehn's picture

The geolocation service you provided had me in Bordeaux, Gironde (department), aquitaine (region), France. I am in Dunstable, MA, USA.

me too

Anonymous's picture

It had me in Auckland NZ - I am in Rennes, France!!! Couldn't be more wrong :-)

re:Incorrect geolocation determination

Vaffunculo's picture

99%? It appears that all shows Belleville. Possible, it
is big enough. But, it also seems to show as all
Waterloo. That seems odd, assuming the blocks are all Charter Business
Net assigned. So,I'll speculate a little.

There are many small/very small towns in that area. The IP blocks may be
assigned to a POP that services a general area. So, the machine may not
actally be in Belleville, it may be in a nearby town.

Hello all! Does someone kn

Anonymous's picture

Hello all!

Does someone know a really free database with geolocations? I need something I can download and it should contain the Country and the City for a given IP.

Thanks! :)

This IPs change too fast !

Anonymous's picture

Hi Folks.

This IP-Detection is a great idea. But it is NOT working 8-)))))

I tested different sources - most of them told me, that I was located in Australia 8-)))))) ... well that is about 10.000 Kilometers from my real location.

To lockout people from a country - lets say Thailand - I use "whois -h" and then parse the string I get back. Done in PHP this is much more easier (and quicker) than to rely on this databases.

... but - the Idea is good ... just lacks some "central intelligence database"


Block IP address country/region

naveen's picture

If you can help me tell how can we block IP region/country and state wise worlwide.
Using which language is more accurate and better.
It's a really great idea-8-)))))
You guys are gr8
u can write me at

re:Block IP address country/region

Sesso's picture

The impression I got from the OP's question is that it's this
identifying information he's worried about. I interpreted it as "if
they can't use reverse DNS to find out who the IP is assigned to, can
they use WHOIS to find out something more specific than the ISP?"

Geolocation by IP address is misguided

Vince Littler's picture

IP [Internet Protocol] is about providing data transport services, not about providing client data such as geolocation.

I have no reference to hand on the different protocol levels, but I would refer to the OSI 7 layer model of datacommunications as an example.

Geolocation information belongs at a higher level than the IP level, where I do not know, but I tend to think it is a new service at an application level.

It is not for any server to look at the client and guess where it is, it is for the client to report where it thinks it is and it is for the client to engage services to discover where it is from some kind of local geolocation server. And only if the user so chooses.

For example, I might be in Gironde France now and know that I will be in Berlin tomorrow. If I plan to see a film in Berlin, location based services are only useful if I can say I am in Berlin, while I do my planning here in Gironde. I do not want to fight with a 'helpful' service which pushes Gironde info at me when I really want Berlin info


Anonymous's picture

I really agree so much. I work in France with a system in en-us (mostly by default) or en-uk or en-ie (if I can) & get fed up with irrelevant localized US info being thrown at me like the rest of the world doesn't exist!


Jim B's picture

There are several good geolocation products in the market like below.

Also see

Anonymous's picture

geoip's match

Nicolas Bouliane's picture

Hi people,

I'm proud to announce you that you can now
match by country with iptables,

iptables -A INPUT -m geoip --src-cc CA

more at:
You can also read the offical netfilter's thread:

Nicolas Bouliane
cookinglinux TM

All private networks are in America

Anonymous's picture

This is just stupid:

LAT: 33.98
LONG: -118.45
LAST_UPDATED: 16-May-2001
LOOKUP_TYPE: Block Allocation

CAIDA Example

Andrew's picture

This output was meant as an example of the CAIDA NetGeo output. I believe the actual reason for CAIDA pointing to Marina Del Rey was their default for unknown locations (and also how the site would appear internally to CAIDA).

For historical reasons

El Buki's picture

Unroutable ranges like 10.x.y.z are never re-registered, so where ARIN is concerned they still "belong" to IANA, onetime co-ordinator of the entire IP address space. IANA was in Marina del Rey for easy access to UCLA (an original ARPAnet node dating to 1969).

Perl geolocation

Anonymous's picture

CAIDA is old and inaccurate. If you're using Perl you should be using IP::Country (free) or MaxMind (free-ish), both available from CPAN. If you're using java or coldfusion, you should be using javainetlocator. I've written elsewhere about the accuracy of geolocation, and how city-level geolocation is inaccurate.

--Nigel Wetters Gourlay

p.s. SpamAssassin now uses IP::Country, which is flattering ;)

Re: Geolocation by IP Address

Anonymous's picture

I am in Pisa, Italy and your system placed me in Amsterdam, Netherlands.
The reason is simple: you queried but it is not the only Internet Registry. European ip addresses information is stored in You have to query the ripe database too.
I guess the same could apply to other Internet Registries like for the Asia-Pacific region...

Anyway I like your approach. Good luck

Got mine bang on

Anonymous's picture

right down to the correct town, good but also worrying...

Re: Geolocation by IP Address

Anonymous's picture

Erm, Amsterdam/Netherlands is nowhere near Swindon/UK. You must be joking?

Re: Geolocation by IP Address

Anonymous's picture

CAIDA is stupid and out of date. Your IP address is marked in the ARIN (US) database as assigned to RIPE (Europe). It doesn't check where in Europe.

RIPE Network Coordination Centre (RIPE-NCC)
Singel 258
Amsterdam, NH 1016 AB

Use an up-to-date database if you're going to try this - IP::Country or JavaInetLocator. CAIDA was a proof of concept, but no one should be using it now.

CAIDA is world's trash can,

Anonymous's picture

CAIDA is world's trash can, full of every country's garbage! They are extremely silly! They are hybrids monkeys, not human beings. We should evacuate CAIDA.

Re: Geolocation by IP Address

Anonymous's picture

Same for two different locations in Germany (one PPP pooled,
one static IP at a rackhoster).

They must assume that the whole of Europe is off for smoking
weed in Amsterdam ;-)

Re: Geolocation by IP Address

Anonymous's picture

Maybe works well in the USA but not here.

The Internet just doesn't work the same way here in the UK - most broadband connections are through British Telecom's network, even if BT isn't their ISP, or through a very small number of cable companies. Almost all dial-up users connect through the national BT phone network on 'virtual', national numbers. The London INternet Exchange is the main peering point, so usually I expect to be placed in London.

The High Earth Orbit site placed me in Amsterdam (that's in the Netherlands by the way).

Re: Geolocation by IP Address

Anonymous's picture

I'm in Venezuela and the reported IP address is in Uruguay!

Re: Geolocation by IP Address (inaccurate results)

Anonymous's picture

Depending on the intended use, this system will be useful/not useful. In my case (and likely everyone else's) it reports the location of my ISP's point of presence, not the actual location of where the IP is routed. In my case, it's about 25-30 miles off target. Now, granted, it knows the state, and pretty close the locality, so for something keying off of state/general city area, it might be useful. But if you want GPS level accuracy, this simply isn't going to give it to you.

Re: Geolocation by IP Address

Anonymous's picture

My real location in the great state of Tennessee shows up as in the heart of Australia

IP Address in Conflict

oil painting portrait artists's picture

Why am I seeing IP Address in Conflict in my computer? I have my own dsl connection. Is it possible that I have the same IP as someone from somewhere?

Re: Geolocation by IP Address

Anonymous's picture

Well my supposed location was at least still in Europe, 1150 kms due north of the real location. But according to the map on the site it put me on the Greenwich meridan and the equator.

Re: Geolocation by IP Address

nilspace's picture

As discussed in the article, the current utilities will sometimes produce erroneous results. Australia is the 'default' unknown response.

I have put a section below the map on the webpage for you to input your actual location. It is then possible to apply new heuristics for determining location when it is unknown (or incorrect).


Re: Geolocation by IP Address

Anonymous's picture

Manually adding IP addresses to a database will lead to great suffering. How will you ensure that the changes made are accurate in six months' time?

--Nigel Wetters Gourlay

Re: Geolocation by IP Address (doing it in Java)

Anonymous's picture


About a month ago, I wrote a small Java library that uses different Geo Internet services to provide you with location information. It's really basic, but it works for me.


Any comments, patches appreciated.



Anonymous's picture

That was a long time ago & the link has moved. Care to update it?

Re: Geolocation by IP Address (doing it in Java)

Anonymous's picture

You assume that by combining different Geo Internet services you will improve accuracy, which isn't the case. You'd be spending your time in a better way by measuring the accuracy of the various services and using just the most accurate. I'm sure that you'll find this one to be the best.


Geolocation by IP Address sucks

Anonymous's picture

I'm somewhere ... and google tries to make me happy with a language I don't understand (great!)
I'm trying to get an online quote, and the server tells me "this service is only available for our US customers" ... great ! (cyclades; fortunately I've got a proxy somewhere else ;-)
I never liked when computers are trying to predict what I want (i.e. getting too smart, 'cause in 90%, they are plainly wrong)


Anonymous's picture

yep, I know I shouldn't follow-up my own article ... but so-what ...
perhaps some people would prefere postings/comment like:
Anonymous@[Lat: 49.5817

Anonymous's picture

Sob. I'm rather disappointed that my site didn't make it into the 'Resources' section at least ... especially considering it is free, the DB is open and available, and there's an API if you don't want to do the whole DB thing. You can even embed the zoom-in applet in your own page if you want...


Re: Geolocation by IP Address

Anonymous's picture

And this is all still available after everyone freaked out about Sean Gorman? Talk about shooting-the-messenger-based information technology security solutions for the Enterprise.