Now that both Google Public DNS and OpenDNS offer an alternative, public DNS services anyone can opt to use instead of their service provider’s DNS servers, the question is: how do you know if your DNS service isn’t working properly and if you should switch? Reader Nicholas has the answer. He says:
The easiest way to determine if your chosen DNS servers are down, you can use nslookup or dig command line tools. Open a command line prompt (Select “Start > Run†and type “cmd†on a Windows machine, “Applications > Utilities > Terminal†on the Mac) and type:
dig google.com
or
nslookup google.com
If an IP address comes back and the web page appears to be loading properly in your browser, your DNS servers are working fine. If no address comes back, or an unexpected web page appears despite a successful dig, there is a problem. “dig†is the newer and recommended tool, but both should work fine for basic troubleshooting purposes.
A few months back I knew my DNS servers were screwy when I couldn’t load certain web sites, but DownForEveryoneOrJustMe.com said those sites were up. At that point I switched my DNS service to OpenDNS and that solved the problem. Here’s more on how to troubleshoot a flaky internet connection. Thanks, Nicholas!
Update: If you just want to see what DNS servers are fastest, benchmark your options with Namebench.
5 Comments
Vince Lund
Then you can use namebench to compare speeds of different DNS servers.
Editor: Fixed the Namebench link in this comment.
Cheng-Jih Chen
Er, I don’t know about Mac (and I don’t have a Windows box to try this on), but I’m pretty sure “dig” and “nslookup” will treat the “http://” as part of the hostname.
I believe “nslookup” is deprecated on Linux distributions, with “host” as the preferred DNS query tool, e.g., “host http://www.cnn.com“.
Note that with “host”, you can specify the DNS server to query by putting it at the end of the statement, e.g., “host http://www.cnn.com 8.8.8.8″. You can compare the results from different DNS servers if you want. “nslookup” and “dig” will have similar options to query specific servers.
Jimmy Blake
Cheng-Jih Chen is correct. You’ll want to leave out the ‘http://’ on those commands. If you’re using OpenDNS, they’ll still pull up an IP with the http://, but that’s only because OpenDNS resolves everything to its own IP if it can’t find the server.
Otherwise though, it’s a great suggestion to show people how to determine if this is their problem or not. Using an alternate DNS has many times saved the day when my ISP has had trouble.
nir
I can also by Steve Gibson (from GRC). As always, Steve’s software is lightweight (written in assembly language), accurate and helpfull.
Gina Trapani
Thanks y’all–just removed the http:// from the commands in this post.