Skip to content
RIPE NCC member · Local Internet RegistryCall us on 020 3318 3449sales@hosting-telecom.uk

IP geolocation: why an address shows the wrong country

Cloud servers2 min read

Where websites get the country and city for an IP address, why they get it wrong and how to fix it — for visitors, server owners and network owners.

Contents

Websites don’t get the country and city for an IP address from an official register, but from commercial geolocation databases: MaxMind, IP2Location, DB-IP and ipinfo, and Google has its own as well. The databases are compiled from registry data, provider data and indirect clues, so they disagree with one another and make mistakes.

Why they get it wrong

  • A block of addresses has been transferred to another company or another country, and the database has not caught up yet. IPv4 addresses are now actively sold and leased, so this is the most common cause.
  • A mobile operator connects its subscribers to the internet through a few large gateways — the city is worked out from the gateway, not from your phone.
  • A VPN, a proxy, a corporate network or iCloud Private Relay — the site sees the exit address, not yours.
  • The network’s registration data gives the country of the company, but the addresses are in use in another country.

Where to check

You can see what your address is and what the registry holds about it in the IP lookup. What the databases themselves think is shown on their websites: MaxMind, ipinfo and IP2Location. If one database is wrong and the others are right, the website is using that one.

If you are a visitor

  • Google accepts reports of a wrongly detected country through a form.
  • If a site won’t let you in because it thinks you are abroad, write to your internet provider and give them your IP address. The databases have to be corrected by the owner of the addresses; corrections from visitors are not usually accepted.
  • Check whether a VPN or proxy is switched on — in your browser, in your system or on your router.

If you are the owner of a network or server

Send a correction to the databases: MaxMind, ipinfo and DB-IP have forms for this, while IP2Location accepts changes only on a certified statement from the network owner. Changes don’t appear straight away — allow anything from a few days to a couple of weeks.

A more reliable way is a geofeed: a file listing your networks with their country and city. You put a link to it in the registry’s database, and the geolocation databases collect the data from there themselves. For how to compile and publish one, see Geofeed: IP address geolocation.

Didn’t find the answer? Ask our support team — we’ll help.

Choose which cookies we may use. You can change your mind at any time with the “Cookie settings” link at the bottom of every page.

Necessary

Always active

They keep the site secure and remember your cookie choice. They don’t identify you.

Google Analytics counts visits and shows which pages people find useful, so we can improve the site. Which cookies