Why my location is detected wrong?

Any existent geo-IP solution in the world does not determine your exact location. All geo-IP techniques are based on a registrant information, provided by an Internet Service Providers to Regional Internet Registries, when obtaining from them an IP blocks.

It means, that each geo-IP service as accurate from geographical location point of view as was stated by a corresponding Internet Service Provider.

In other words, geo-IP services only makes an assumption on your possible geographical location with accuracy up-to the city level in the best case. So if, you found yourself somewhere in The White House, do not be surprised, it actually points you to the city of Washington, DC, where The White House is. If you are really in The White House - it does not mean that we really know it.

From the other hand, each of five existing RIR databases does not follow the same format of the registry data, and most of them does not contain dedicated "city" field. It means that the city is not mandatory to be filled-up by an ISP, or format of the city is not strictly defined. Those databases also contains a lot of errors, with human-factor nature, as far as all the information is written with latin alphabet, but providers work in a different language-speaking areas with different alphabets. So the data was transliterated by a given ISP in some manner. Even in the same area, by applying the different transliteration rules, you may obtain a different city name variants within the latin alphabet.

Those databases also contains spelling errors, etc. All this makes extraction of geographical data very complex and less accurate as it could be imagined.

And the last problem is that ISP could register an IP block to it's own address of location, but may serve clients from another cities or regions inside the country.

That's why sometimes it is even impossible to detect the location more accurate than a country-level.

By the way, for a large amount of existing IP-addresses a location could be detected with a good reasonable accuracy level, you just need to know that there is no reason to trust this information 100%. And you have to understand that sometimes having even not 100% accurate information is better than have nothing.

See more: