You might know the feeling: internet being slow and laggy for no apparent reason. So you get annoyed, you decide to search for reasons and along the path you find people who tell you that the cause of slow loading times might be your ISP’s DNS Server. And so they suggest that you change your DNS server to Google’s aesthetically pleasing IP address 126.96.36.199.
This is not as smart as it seems because this may actually slow your connections down, and it’s not a trivial matter. Here’s why.
When your computer looks up the IP address it contacts whatever you configured as your DNS server. If you didn’t change it, it’s usually the DNS server that belongs to your ISP. Some people change it, for example because they don’t trust their ISP.
This argument is quite nonsensical by itself. Firstly because DNS lookups are done in plain-text and thus, if you use a DNS server on the Internet instead of your ISPs, the packets travel a greater distance. Of course this implies there is a greater chance that your DNS requests are in fact less safe: each hop could easily monitor this activity.
But there’s more.
As an example let’s say you live in the UK and decided to use Google’s DNS servers which are in the USA. You have just received a notice that the new NoAgenda show is available to download and you push the button to save it on your device.
What happens in this case with DNS, is as follows. First your computer asks Google for the IP-address of the NoAgenda MP3. Google has no idea so it looks it up, going all the way back to our DNS. Once corrected, it gets Google’s request: “Hey, what’s the IP for mp3s.nashownotes.com?”
Before our server can answer that question, it uses the DNS equivalent of Caller-ID: it looks at the IP that Google uses to connect, and checks is own database to find the country to which it belongs. Because Google’s IP originates in the US, it answers: “The IP address is a.b.c.d.” Google saves this IP address and consequently passes this IP to you.
So now your computer (still in the UK) will connect to that IP address – the one closest to Google, NOT necessarily closest to you!
If you had used your own provider’s DNS, you’d get a different answer and would be able to connect to a server closer to you. Generally speaking that means less latency, more speed.
Many content providers, like YouTube, Google and even an egghead like me, is using servers that are relatively close to their main audience. In our case we have two servers in Canada and one in Europe. In our case, yeah, we do it with DNS for us this is the only way to do it.
Still, if you want to use a DNS server that doesn’t belong to your ISP I’d suggest you take a look at the OpenNIC project: this is a DNS project, which is free to use for all and has servers that are geographically close to you. And they don’t log your DNS requests. Head on over there and have a look, it’s worth checking out.