Forum Moderators: open

Message Too Old, No Replies

How Google locates countries from IP addresses

If your site is wrongly located, try this.

         

igloo

10:10 am on Feb 28, 2003 (gmt 0)

10+ Year Member



In my search to find out why Google put my London-hosted site in the results at google.nl rather than google.co.uk, I have been using a number of different methods to locate the country based on IP.

And I think I've found what Google use, because everything I've tried located me in London.

I think google are using NetGeo (http://www.caida.org/tools/utilities/netgeo/)

" After obtaining a record from a whois server, the NetGeo Perl scripts parse the whois record and extract location information and the date of last update. The NetGeo parser attempts to extract the city, state (or province, district, etc.), and country from the text of the whois record. For US addresses the parser also extracts the zip code, if possible. If the parser is unable to parse an address it attempts to find an area code or international phone code in the contact section; the phone code is mapped to a country and then the parser attempts to parse the address again, using the hint provided by the phone code. The parser also guesses the country from email addresses with 2-letter TLDs found in the contact section. "

The strange thing is, the sites in question pass all of these tests (i.e. they would all show up as UK according to WHOIS) but NetGeo still puts my site in Amsterdam.

Can anyone else who has been wrongly located by google, please test their site/IP through the netgeo database and see where it thinks you are located? Chances are you will appear in local SERPS for that area.

I tested my site/IP through [xpenguin.com...]
a free PHP script using netgeo data.

I would be very interested to verify that this is how Google locates sites, because at least this way I can test an IP BEFORE letting it loose on Google.

hetzeld

10:30 am on Feb 28, 2003 (gmt 0)

10+ Year Member



Hi,

There's a message on their page stating: "Sorry. NetGeo has stop responding recently. It should be fixed soon"

Even then, when entering the page, it locates my IP in Amsterdam, which is probably the default value (starting with letter A?)

I know that , according to U.S. mileage perception, my location in France isn't really far from Amsterdam, but there is even another country in between (Belgium) so we're not even close neighbors ;-)
Google correctly displays my sites as located in France.

Dan

Receptional Andy

10:35 am on Feb 28, 2003 (gmt 0)



This seems to be working anyway. regardless of the error

igloo

10:36 am on Feb 28, 2003 (gmt 0)

10+ Year Member



Hmm, not sure about the error. In any case, that page correctly locates every IP I enter into it, except the sites that are wrongly located in Google, where it then locates my in Amsterdam. Which has to be more than a coincidence, because this is the regional variation of google that my sites have been included in.

>Google correctly displays my sites as located in France.

What I really need is people with .com/.net/.org domains who have had problems with google's location system to try their sites with this, and my guess is that this will tell them which site they have been included in, and where google thinks they are.

zgb999

10:38 am on Feb 28, 2003 (gmt 0)

10+ Year Member



I checked out several IPs and most of them are giving the correct location (though I also got the error message). I had one IP that couldn't be located and some were showing Amsterdam though they aren't located there.

Anyhow I had one IP where it said it was located in Amsterdam but the site is showing in Google.ch when restricted to Swiss sites only. So either Google is not using this database or what we are getting for our querries is not the version Google is using.

igloo

10:42 am on Feb 28, 2003 (gmt 0)

10+ Year Member



Dammit, I was hoping I had this right.

>some were showing Amsterdam though they aren't located there

IS it a coincidence then, that this is where my sites have been placed? When I went to the netgeo site, this seemed like a good contender for what Google use to locate sites without regional domain names.

WebWalla

10:48 am on Feb 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's definitely a bit shaky. I did a test for the Google data center in Zurich and this was the response ...
"www-zu.google.com (216.239.55.100) is located in Mountain View, California, United States"

So it probably takes the main IP address for the range and looks from there.

Maybe your hosting company has a range of IP's from Holland, even though your server is located in the UK.

johnser

11:09 am on Feb 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm using BT ADSL as my ISP here in London and I'm allocated a dynamic IP from them.

Testing my current IP shows Amsterdam which can't be right for BT?

Testing other IPs shows various correct international locations.
J

igloo

11:12 am on Feb 28, 2003 (gmt 0)

10+ Year Member



As I recall, in my original posts when I first discovered the problem, some people hosted by BT were showing up in the wrong location too (presumably Holland?)

[webmasterworld.com...]

>I've got a US based site at www.domain.com and a UK site at www.uk.domain.com. The US WHOIS resolves to the US and the UK subdomain resolves to the UK (hosted with BT). Still not getting the UK site listed in UK specific SERPs. <

So maybe this is what Google use? But obviously they also check domain names etc. before they rely on this, so it wouldn't affect everyone.

jmccormac

11:25 am on Feb 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I haven't looked at the code for netgeo yet but I think I see why the NL (Netherlands) data is being returned for a London based IP. It also returns NL for my own Class C which is located in Ireland. It is checking the top entry for the IP range in RIPE. Therefore it gets the big range of IPs handled by RIPE rather than the precise one. The results for my IP range (minus the critical stuff) are below:
TARGET: 193.120.nnn.nnn
NAME: EU-ZZ-193
^^^^^^^^^
This is the critical one. It is the net name for numbers beginning with 193. Since this is the first range, it stops at that.

NUMBER: 193.0.0.0 - 193.255.255.255
CITY: AMSTERDAM
STATE: NORTH HOLLAND (province)
COUNTRY: NL

If you need to check RIPE whois data then use:
[ripe.net...]

That should give you a more accurate set of results for European IPs handled by RIPE.

Somehow I don't think that Google is using this kind of gelocation service for determining where a webserver is hosted. Indeed I have grave doubts that Google is even using anything approaching a good geolocation solution.

The IP owner data returned by the whois servers only shows who the range is assigned to rather than where they are. It can be a very tricky thing to sort out the location and there is always an element of error. For example in the RIPE database, some IP ranges have US as the country and the owners are US. However the IP ranges are used in Europe by the subsidiary company. Relying only on IP whois data to establish the location of a webserver or IP range is risky. I know - I am working on the geolocation problem for European webservers. :)

Regards...jmcc

igloo

11:33 am on Feb 28, 2003 (gmt 0)

10+ Year Member



Thanks jmccormac. This actually makes things even more complicated from my point of view - if I check the first 2 sets of numbers in RIPE (xxx.xxx.0.0) I am resolved to switzerland, if I add any extra numbers I show up as London GB.

I actually tried RIPE previously and discounted it as the reason for Google's faulty locating because at no point does RIPE list me as being in the Netherlands.

The Subtle Knife

2:50 pm on Feb 28, 2003 (gmt 0)

10+ Year Member



So, the upshot is, if your say based in London,
as host a site in USA ( to save money ) does
that mean that google will think you are in the USA?

Surely this is a fundamental flaw.

igloo

2:55 pm on Feb 28, 2003 (gmt 0)

10+ Year Member



>So, the upshot is, if your say based in London,
as host a site in USA ( to save money ) does
that mean that google will think you are in the USA?

You would still be in UK results if you had a UK-specifc domain name like .co.uk or .org.uk

However, if you had a .com a .net .org/whatever, then yes, Google would think you are in the US, and not put you in any regional results.

>Surely this is a fundamental flaw

Possibly, but what i'm talking about above is a site hosted in the UK (London) that Google has mis-located as being in Holland, which seems like a much more fatal flaw to me! ;)

heini

2:55 pm on Feb 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>as host a site in USA ( to save money ) does
that mean that google will think you are in the USA?

Actually there are 2 params used: ccTLD and hosting location. The second is only critical if you do not have the appropriate ccTLD.

But then - if you have a dot-fr, for example, and your site is served from Paris - how should an engine know you are a swedish site?

Receptional Andy

3:00 pm on Feb 28, 2003 (gmt 0)



>how should an engine know you are a swedish site?

Clearly it shouldn't, and no rule would ever be 100% perfect, especially if you host it in a country other than the one you are aiming at.

But if you are a UK hosted site then it should!

[edited by: Receptional_Andy at 3:01 pm (utc) on Feb. 28, 2003]

awoyo

3:00 pm on Feb 28, 2003 (gmt 0)

10+ Year Member



The whois for www-zu.google.com is registered to Mountain View, CA, but the IP address (and of course the domain name) traces to Zurich. Btw, I'm using NeoTrace.

igloo

3:04 pm on Feb 28, 2003 (gmt 0)

10+ Year Member



This is why I find this so frustrating - NeoTrace correctly identifies my location, as does everything apart from Google (and NetGeo as I discovered yesterday).

Maybe I should start transalating my sites into Dutch... ;)

allanp73

6:52 pm on Feb 28, 2003 (gmt 0)

10+ Year Member



It showed my site as being located in Oakville Ontario. However, my server is located in Nova Scotia Canada. At first I was confused, however, I realized that the company that hosts my site their network provider is located in Oakville. So it could be the same case wit your site. That the network connection is actually located in a different location than where your sites are hosted.