Different DNS query results from different locations

domain-name-system

I get different results on querying the same DNS server from different locatoins. E.g. from home:

> nslookup en.wikipedia.org 8.8.8.8
Server:  google-public-dns-a.google.com
Address:  8.8.8.8

Non-authoritative answer:
Name:    en.wikipedia.org
Address:  198.35.26.96

From DigitalOcean's VPS:

$ nslookup en.wikipedia.org 8.8.8.8
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
Name:   en.wikipedia.org
Address: 208.80.154.224

From another location in another country:

> nslookup en.wikipedia.org 8.8.8.8
Server:  google-public-dns-a.google.com
Address:  8.8.8.8

Non-authoritative answer:
Name:    en.wikipedia.org
Address:  91.198.174.192

How is this possible? I get the same results upon querying the SOA (ns0.wikimedia.org at 208.80.154.238) instead of Google's server as well. I would assume some kind of round-robin, but no! Returned IP is always the same for the same location. And all returned IPs belong to WikiMedia according to reverse DNS records, so this is not some kind of malware. But how does it work then?

Best Answer

It's GeoDNS, or whatever people like to call it. There are some providers that offer this service. Different results based on where the lookup came from.

https://en.wikipedia.org/wiki/Geodns

https://www.zerigo.com/docs/managed-dns/setting_up_geodns

https://aws.amazon.com/route53/faqs/#what_is_geo_dns