HACKER Q&A
📣 warrenm

How does geolocating with IP addresses work?


There are many publicly available services that post only their IP address

Google, Quad9, and Cloudflare are biggies with 8.8.8.8, 9.9.9.9, and 1.1.1.1

How do they geolocate users so they're doing DNS resolution "locally" instead of from wherever that IP actually points?


  👤 gregjor Accepted Answer ✓

👤 incomingpain
They don't geolocate. You setup the DNS servers in various datacenters around the world, then BGP anycast the address.

So there are many dns servers with the virtual ip of 8.8.8.8.

Then the way bgp works, you will route to the nearest path. Which will tend to be geologically close.

https://datatracker.ietf.org/doc/html/rfc1546