I've been enjoying the benefits of Geo IP lookup from database for some time. It's great.

People are increasingly trying to access my site from a mobile phones or 3G modems, and their physical location seems to have little relation to whereabouts my IP lookup tells me they are. A user who is on the east coast of my country, may be looked up as being in the far inland, or up north. And one user may be reported as being in one location in one moment, and seconds later, be 100s of kilometers away.

This is becoming a problem, and I need to find a solution. I am already updating my database monthly, but it has little effect.

What can be done?

  • 6
    I'll sound unhelpful here (hence this being a comment, rather than an answer): It would sound like the solution, to me, would be a protocol to allow the user to opt-in to revealing their geographical information (as pulled from their GPS, etc) rather than attempting to unreliably infer it from IP address. I rather like the idea of my IP address not having any geographical connotations. >smile< Mar 24, 2010 at 19:26
  • 1
    xkcd.com/713 Mar 24, 2010 at 21:06

3 Answers 3


One option is to use geolocation in the browser. Not many devices support it however. Ultimately, GeoIP is an unreliable hack.


Have you considered just asking users to enter their zip code?

  • 1
    Just as long as this is done properly. Every time I go to the website for my favourite hardware store on my mobile (yes, www.bunnings.com.au - I'm talking to you) they FORCE me to enter my post code and won't let me continue without it. The fact of the matter is a lot of the time I don't KNOW what my current postcode is, and the information I'm after has absolutally no bearing on my current location. So this sort of approach needs to be thought out carefully. Mar 24, 2010 at 21:05
  • You've hit upon a problem with your answer in the very answer itself: The world is a very large place and some parts of it aren't where you are from: Not all of us have a "zip code". Parsing all the possible alternatives to a Zip Code is far from a trivial task.
    – Rob Moir
    Nov 15, 2010 at 17:00

How about linking up with an external GeoIP database, rather than maintaining your own?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy