Slow Internet? Edit your DNS settings

networkhub

Do you ever wonder how you can click a link on a webpage and quickly zip to another page on a server halfway around the world? Or send an email message to aunt Alice or uncle Bob, using just their simple email addresses? All this depends on DNS, or the Domain Name System. This is what lets your computer find macworld.com, keeping track of the fact that this domain name corresponds to an IP address of 70.42.185.230, and that numerical address is hosting Macworld’s webpages. When you click on a link, your browser sends a request to a Web server to load a page, but that request passes through a DNS server, which stores this information in huge databases containing every single domain recorded listed together with its numerical address.

You can find the numerical address for a website, if you want. In your /Applications/Utilities folder, there’s a tool called Network Utility. Click the Lookup tab, enter a domain name, then click Lookup. You might even want to do this if you’re having trouble accessing a website and need to do so in a hurry. Sometimes DNS servers have glitches, but you can always access a website by using its numerical IP address. If you copy the numerical address and paste it in your browser’s address field, you can still visit that site, assuming the site itself isn’t down.

lookup

You can use OS X’s Network Utility to find the numerical equivalent of a domain name from the Lookup tab.

As you can imagine, some DNS servers respond more quickly than others. If you use a slow DNS server, this can make your Internet usage slower. It’s not that big a deal when you’re checking email, for example. Your email client only looks up two addresses per account: one for sending email, and another for receiving. But when you load a webpage, there may be elements from dozens of different servers, all of which your computer needs to request from different locations. Each of these requests needs to be answered, and the time it takes to answer them contributes to the time it takes to load a webpage.

In normal circumstances, the amount of time to send a request to a server and get a response is in the tens of milliseconds; you can’t even blink your eyes that fast. But if the DNS server your Mac uses is slow or overloaded, this can make some of your Internet activities slower. This usually isn’t a terrible problem as an extra quarter-second to load a webpage won’t kill you. But some DNS servers can be slow enough to hobble your activity.

Using public DNS servers

You probably don’t even know which DNS server your Mac uses. By default, it uses the DNS server that its router connects to. If you have standard DSL, cable, or fiber Internet access, your router connects to your ISP’s DNS server. But you can change that (and you may want to) in order to speed up some of your Internet activity.

There are two good public DNS servers you can use. OpenDNS claims to be “the world’s fastest and most reliable DNS.” It’s free for personal use, and you can set your Mac or your iOS devices to use this DNS server. And Google offers its own public DNS server, which the company claims can “speed up your browsing experience.”

It’s quite simple to change DNS servers on OS X. Open System Preferences and click the Network icon. You’ll find a number of connections listed in the left-hand list. One of them will have a green bubble next to it indicating that it’s active. Click it, then click the Advanced button near the bottom-right of the window.

Click the DNS tab, and you’ll likely see something like this:

dns

My DNS server is set to my router’s address; this means the router sends DNS requests to its default DNS server, which is my ISP’s server.

Click the plus (+) button and enter one or two IP addresses for a new DNS server. To use OpenDNS, enter 208.67.222.222 and 208.67.220.220; to use Google DNS, enter 8.8.8.8 and 8.8.4.4. Click OK, then Apply.

But is it really faster?

While OpenDNS and Google DNS also offer some security features, the main advantage to changing your DNS server is its speed. If both of these companies claim their DNS servers are faster, it’s worth checking, right? There are a number of ways you can check the speed of your DNS server, but one of the easiest to use is Google namebench, a free app that Google provides. It checks thousands of public DNS servers and compares their speed with yours. Launch the app, then either let it use the DNS server it finds by default—this will often be your router, or 192.168.1.1—or enter one manually if you want to check a specific DNS server that your Mac or your network is using. (Make sure you’re not downloading or uploading a lot of data while namebench is running.)

namebench

Google namebench lets you scan thousands of public DNS servers.

I have two networks at home—a slow DSL connection and a faster satellite connection, which suffers from much higher latency (the time it takes to send data to the satellite and receive responses). I ran Google namebench on both of my networks and found some interesting results. When it’s finished, it opens a webpage in your default browser, displaying your results. (Note that namebench takes quite a while to provide results; launch it and go get a cup of tea or two.)

For the DSL connection, I found that using Google’s public DNS server is 192.2 percent faster than my ISP’s DNS server. And OpenDNS is 124.3 percent faster. (There are other public DNS servers listed in the results; you’re welcome to explore them if you wish.)

namebench1

Google namebench showed me that the Google DNS server is a whopping 192% faster than my ISP’s server.

Surprisingly, when I checked my satellite connection, I found that the high latency means that there are only marginal gains in switching to a different DNS server. The fastest public DNS server—Google DNS—was only 10.3 percent faster than the default.

So Google’s DNS server is clearly faster for me, but that might not be the case for you. This all depends on your ISP, which DNS server(s) it uses, and current network conditions. After setting my DNS to 8.8.8.8, I ran another test which told me that Google’s second DNS server, 8.8.4.4, was 50 percent faster than the first. (If you find this to be the case, you can change the order of the DNS servers in the Network preferences. To do so drag the faster one to the top. Again, it may not be faster all the time.)

If you do move away from using your default DNS server, you might want to check it from time to time, using namebench, to see if it’s still faster. Also, it’s possible that some software won’t work well with a non-default DNS server, or that your ISP may have some issues if you use a different DNS server. If this happens, it’s easy to switch back. In the Network preferences, where you added the new DNS server, select it, then click the minus (–) button to delete it.

As we spend more time on the Internet, lack of speed is less about your computer’s processor and more about your broadband connection. A faster DNS server can help in this regard. Take some time and try one out. You may find that it makes a difference.

To comment on this article and other Macworld content, visit our Facebook page or our Twitter feed.
Related:
Shop Tech Products at Amazon
Notice to our Readers
We're now using social media to take your comments and feedback. Learn more about this here.