Accuracy of IP->Geo location?

I recently moved some of my site’s static content to be served through Amazon CloudFront. Testing on from a few locations around the world, I wanted to confirm that this content would be served from regional locations. Results showed that the CloudFront files were always coming from Seattle regardless of the test location.

Upon closer inspection, it looks like the content was being served regionally, but the IP geo lookup was inaccurate. (In this case for Amazon it seems all their addresses are reported as Seattle, WA.)

For example, here’s a test I ran from Paris, France:

The CloudFront files are served from domain which resolved as Doing a traceroute to from my office in San Francisco ends on a level3 network in Paris, so it appears the CDN files are being served regionally in this case.

My conclusion is that the IP Geo reverse lookup isn’t always accurate and might provide misleading results. This isn’t an issue specific to (testing this same IP on a bunch of other Geo IP tools gave the same results), but just a caution I guess not to rely on it too much.

bcantoni, I worried about the same thing when I first started to use CDN. The best is to look at ping times from various world locations and compare them to the ping times you would get without your CDN.

Your CDN’s ping times are better:

Thanks Marvin. That just-ping service really does show the better CDN ping times. Good tool to keep handy.

Yep. I’ve been considering removing the MaxMind GEO lookup because it doesn’t do very well with CDN’s. I might just disable the lookup for CDN hosts since I’m already identifying those.

Usually, most geo lookups guess the location of the owner of the IP, not where the IP belongs to…

The most accurate way to find location is traceroute to it from different locations and try to guess the location.

Hello all,

I’d be very grateful for any advice. On Sunday night my (UK based ecommerce) site went down and my web hosts told me it was under a massive DDoS attack. We had to sign up with a CDN company and have gone with an Edgecast reseller. The site is finally back up (48 hours later!) but, like pmeenan, the maxmind geo-ip lookup thinks everyone is based in the US.

Edgecast CDN does route people to the nearest server, but these servers still look like they’re in the US. We use Maxmind geo-lookup to select the most appropriate default currency and delivery charge for customers so without it (especially when it appears in dollars to our UK customers), our site is a lot worse off.

So far, neither maxmind or edgecast have been able to provide any advice on how I can use both of these services together.

If anyone has any advice then I’d be very grateful.



Most proxies/CDN’s will add a X-Forwarded-For header that tells you the IP address of the actual user. You should use that instead of the connected IP address (which will be the edgecast server). If you want to make your code flexible then you should use X-Forwarded-For always and fallback to the peer address if the header isn’t present.

Thanks so much for that - very much appreciated. I passed that info on to my web developers who have now sorted it.

There was actually a related post on SlashDot fairly recently about accurately geolocating a user from businesses and schools with onsite servers located in the local area, actually worked wonders in the city they were testing it in -although obviously out in the countryside things begin to look a bit more bleak due to the distances between isolated houses and the closest town with multiple businesses…

If anyone else read the same post, I’d be really grateful if they could PM me with the link or post it here - it was a great bit of research!

They are often accurate, but can also be poor.
For example, most geo databases list me as being in Adelaide. I am connected to the Internode POP in Adelaide, but I live in Perth.

In my case, I have an IP address that belongs to a very large geographical area.

Another example: an ISP might have a range that is used for Queensland. A device will get an IP address whether they are in Tweed Heads or Cape York. In that case, they may all look like they are in the same location.

I would use them as a guide, but I wouldn’t count on them for anything mission-critical.
[color=#efefef]replica watches[/color] [color=#efefef]replica watch blog[/color] [color=#efefef]replica watches[/color] [color=#efefef]replica watch[/color] [color=#efefef]replica watches links[/color]