Tips & Tools

Dealing with “Server Not Found” Errors and Flaky DNS Servers

I get a lot of random “Server Not Found” errors while browsing from my home connection:

Image001

In Chrome, the error is:

The server at http://www.google.com can’t be found, because the DNS lookup failed. DNS is the network service that translates a website’s name to its Internet address. This error is most often caused by having no connection to the Internet or a misconfigured network. It can also be caused by an unresponsive DNS server or a firewall preventing Google Chrome from accessing the network.

After a lot of frustration and some digging around I discovered that this was caused by my ISP’s flaky DNS servers.

It turns out that our friend Google has a free service called Google Public DNS that I can use in place of my ISP’s flaky servers:

Image002

There are actually more legitimate uses for Google Public DNS:

Image003

Now ever so often my ISP will terminate my session and I have to log in via a web interface, which doesn’t come up properly if I’m using Google’s public DNS servers.  So then I have to switch my ISP’s DNS servers:

Image004

All this switching can be quite a pain, but it can be automated. There is a command line tool called netsh.exe that can be used to modify the network configuration.

So I created two batch files, one for switching to Google’s DNS servers…

netsh interface ip set dns "Wireless Network Connection 6" static 8.8.8.8 primary
netsh interface ip add dns "Wireless Network Connection 6" 8.8.4.4

…and one for switching back to my ISPs DNS servers…

netsh interface ip set dns "Wireless Network Connection 6" source=dhcp
Note that you would need to change “Wireless Network Connection 6” in the commands above to whatever your connection is called.

 

Hope you find this useful!
Standard

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s