Where the site thinks you are
Two ways a place shows up on a request: an approximate city from the network, and a precise point only you can hand over. Here's where each one comes from and how far to trust it.
Every request your browser makes carries a rough answer to "where is this person?" You never typed it, and no prompt asked you for it. It comes from the network.
This note looks at that answer: how it ends up on a request, what this site keeps of it, why it's so often wrong, and how it differs from the precise point a browser shares only when you say so. The IP geolocation lab shows both. Open it in another tab and follow along.
The city you never typed
Your browser doesn't send a location. It sends a request from an IP address. Before that request reaches this site's code, Vercel's edge network looks the address up in a geolocation database and attaches the result as request headers. Vercel documents headers such as x-vercel-ip-country, x-vercel-ip-country-region, x-vercel-ip-city, x-vercel-ip-latitude, and x-vercel-ip-longitude.
These are the edge headers on the enriched record in What a beacon actually sends. Nothing runs in your browser to produce them, and there's no permission prompt, because the browser isn't involved. That's why, on this site, the only control over them is measurement consent. Decline, and the lab doesn't read a stored point, doesn't ask for GPS, and doesn't load the map.
What gets kept
The lab stores latitude and longitude from those headers to two decimal places. One hundredth of a degree of latitude is about 1.1 km. East to west the distance shrinks as you move away from the equator, so the stored point is a square of roughly a kilometer or less.
Keeping more digits wouldn't make it more accurate. The header is already an estimate for a whole block of addresses, so extra decimals would only add false precision.
The map stays unloaded until you accept for a related reason. Map tiles are images fetched from a tile server, and each tile request tells that server your IP address and which patch of the world you're looking at. A map is a third-party request in its own right, so it waits behind the same consent switch as everything else.
Why the city is often wrong
A geolocation database maps blocks of IP addresses to where the network registers or routes them, not to where you're sitting. That gap shows up in ordinary ways:
- Mobile data often leaves the carrier's network through a gateway in another city.
- VPNs and company networks exit wherever their servers are, which can be another state or country.
- Privacy relays, such as iCloud Private Relay, deliberately report only a coarse region.
- Fallbacks. When a database only knows the country, it may return a point near the middle of it. One database's default point for the United States famously landed on a farm in Kansas, which then got blamed for millions of addresses it had nothing to do with.
So treat the IP city as a fact about the network, not a fact about the person. The lab says the same thing: it is approximate, it is not a street address, and it can be wrong when the network exits far from the visitor. It's also one reason the home page's personalization rules use time, device, connection, referrer, and reading history rather than the IP city.
The point only you can hand over
The second kind of location is different in every way that matters. It comes from the browser's Geolocation API, navigator.geolocation.getCurrentPosition(), and it only works on a secure (HTTPS) page. Calling it makes the browser show its own permission prompt. If you allow it, the page gets a latitude, a longitude, and an accuracy radius in meters, worked out from GPS, Wi-Fi, or cell towers depending on the device.
On this site that only starts when you press Share precise location. That means two separate locks: measurement consent on the site, then the browser's prompt. Both have to say yes.
Even then, latitude and longitude are rounded to three decimal places, and accuracy to the nearest 100 meters, before the point is stored. It stays out of the anonymous city clusters, so a precise point never ends up mixed in with everyone's approximate ones.
The map doesn't need the database
One detail in the lab is easy to miss. The map draws your city even when the beacon can't be stored. That works because the city isn't read back from the database. It comes from the headers on the request that loaded the page. Storage is a separate step that can fail without taking the map down.
The reverse holds too. On a local machine there's no edge in front of the site, so those headers are empty, and the record says so instead of inventing a place. Empty is a result.
Try it
Open the IP geolocation lab and turn measurement consent on. The map loads and shows the city your request arrived from. Is it where you are?
Then change the network. Switch your phone from Wi-Fi to mobile data, or turn a VPN on, and reload. The city often moves even though you didn't.
Last, press Share precise location and accept the browser prompt. Now there are two points on the screen, answering two different questions. The IP city answers "where is this network?" The precise point answers "where is this device?" Only the second one is really about you, and only you can give it.
More on the request that carries these headers: What a beacon actually sends.
Labs that show this
- IP geolocation accuracy
City-level IP location from the request, an optional precise point, and a follow view with Standard or Prefer high accuracy. Follow saves no trail.
- What your IP gives away
Set the network's city beside a browser point you choose to share. The map draws the gap and the distance. The point stays in this tab and is not stored.
- A page shaped by place
The same page changes with a coarse place: city, local time, weather, and a nearby landmark. A panel names every signal that was used. Nothing is stored.
Recommended next
Why these picksReading path transitions…