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:
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.
Then you can use namebench to compare speeds of different DNS servers.
Editor: Fixed the Namebench link in this comment.
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 18.104.22.168″. You can compare the results from different DNS servers if you want. “nslookup” and “dig” will have similar options to query specific servers.
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.
I can also by Steve Gibson (from GRC). As always, Steve’s software is lightweight (written in assembly language), accurate and helpfull.
Thanks y’all–just removed the http:// from the commands in this post.