|
|
|
|
|
by dsl
4925 days ago
|
|
Run 'dig +short whoami.ultradns.net' in your terminal. You'll get back the IP of the DNS server you are using. Your ISPs recursive DNS servers send off a query to the sites authoritative servers, which in turn look at the source IP address. That's how they know. (Source: I've built a few CDNs) |
|
A standalone (single-IP) site not using a CDN, or even a site that uses a CDN solely for bulky static assets, has no direct way to query what DNS servers a client used, other that the fact that those servers resolved the request Host to the listening IP. (Perhaps it could probe by attempting a number of resource loads from hostnames that resolve differently based on different major DNS sources, but that's be obtrusive and require constant maintenance.)
Especially in the 'long tail' (of not-top-1-million-sites), I'd expect the non-CDN or CDN-only-for-big-assets setup to predominate, and so any geographic adaptation would be more likely based on IP lookups (via a database like from MaxMind), rather than CDN inference.
Or is there some other way even static-asset CDNs somehow communicate back their geography-sensing back to primary sites?