One of the reasons why I generally recommend to stick to your ISP's DNS server (unless requiring special filtering services) is that your ISP DNS is almost guaranteed to point you at the closest location when you try to access a site that's behind a CDN.
For testing this, www.google.com is great, because the reverse lookup of their servers seem to contain the international airport code in their hostname, telling you the location of that datacenter.
Here's a few examples. I am located in Montreal.
1) With ISP's DNS
YUL = Montreal.
2) With Quad 9
YYZ = Toronto (Rush fans will recognize this one
)
IAD = Washington DC (Washington Dulles International Airport)
Which is a bit odd. First one is very close to me, the second one would be a good bit further away.
Cloudflare seems to be more random - sometimes they properly point me at a Montreal location, sometimes at a slightly farther away New York server.
EDIT:
You can make it a one-liner, like this (in this example I test using Yandex):
(not sure what LI would stand for. I had someone in Russia try, and they get LM instead. Different naming scheme in Europe?)
So when picking up a third party DNS, I recommend doing this little test to see how optimal their routing will be for your specific location.
For testing this, www.google.com is great, because the reverse lookup of their servers seem to contain the international airport code in their hostname, telling you the location of that datacenter.
Here's a few examples. I am located in Montreal.
1) With ISP's DNS
Code:
merlin@ubuntu-dev:~$ dig www.google.com +short
172.217.13.196
merlin@ubuntu-dev:~$ host 172.217.13.196
196.13.217.172.in-addr.arpa domain name pointer yul03s05-in-f4.1e100.net.
YUL = Montreal.
2) With Quad 9
Code:
merlin@ubuntu-dev:~$ dig www.google.com @9.9.9.9 +short
172.217.2.100
merlin@ubuntu-dev:~$ host 172.217.2.100
100.2.217.172.in-addr.arpa domain name pointer iad23s72-in-f4.1e100.net.
100.2.217.172.in-addr.arpa domain name pointer yyz10s05-in-f4.1e100.net.
YYZ = Toronto (Rush fans will recognize this one

IAD = Washington DC (Washington Dulles International Airport)
Which is a bit odd. First one is very close to me, the second one would be a good bit further away.
Cloudflare seems to be more random - sometimes they properly point me at a Montreal location, sometimes at a slightly farther away New York server.
EDIT:
You can make it a one-liner, like this (in this example I test using Yandex):
Code:
merlin@ubuntu-dev:~$ host $(dig www.google.com @77.88.8.8 +short | tail -n 1)
105.222.194.173.in-addr.arpa domain name pointer lo-in-f105.1e100.net.
(not sure what LI would stand for. I had someone in Russia try, and they get LM instead. Different naming scheme in Europe?)
So when picking up a third party DNS, I recommend doing this little test to see how optimal their routing will be for your specific location.
Last edited: