One major culprit of slow browsing speed on the Internet, other than your connection speed and latency (the time it takes for a packet to travel from your computer to a server), is the Domain Name System (DNS). Each machine on the Internet has a unique number assigned to it by an Internet Service Provider (ISP), an Internet protocol address, commonly known as IP address, such as 74.125.67.100, which is the IP address for Google. If you type http://74.125.67.100 in your browser URL bar, it will take you to the same Google search page as http://google.com. Since IP addresses are very hard to retain and share, DNS was created. When you type google.com in your browser, a request is sent to a DNS server. The DNS server looks up the domain name in a table and returns the IP address. Then the browser connects to the Google server. Think of it as a telephone. You say or select “Bob”. Then the phone looks up Bob’s number in the address book then calls 123-555-4567.
Most likely, you are using your ISP’s default DNS server, and it is most likely pathetic if you are on Comcast, Charter, or AT&T. They can be slow, time out, or go down often. If, for example, you cannot browse any websites, but iChat works, you are having a DNS problem. iChat doesn’t use domains; it uses IP address directly.
Your ISP’s DNS server most likely connects to a higher DNS server and caches the result. It is best to replace your ISP’s DNS server with one higher up the food chain. There are a few choices. Two of the most popular are
Level 3 and
OpenDNS. They are not created equal. Level 3 is a major communications company, they run backbones (very big pipes) and supply to bandwidth to ISP’s, such as Comcast. Their DNS servers,
4.2.2.1,
4.2.2.2,
4.2.2.3,
4.2.2.4,
4.2.2.5,
4.2.2.6 are very fast for people in United States, but can be quite slow for the rest of the world. OpenDNS provide many features, such as parental control, logging, usage graphs, keyword shortcuts, phishing protection. However, their DNS servers,
208.67.222.222,
208.67.220.220, can be fluctuating in reliability and speed.
Google has now released
Google Public DNS, with servers
8.8.8.8,
8.8.4.4 for free. Sometimes, they are faster than Level 3. Other times they are not. They are certainly faster for those outside of the United States. Besides speed, they also have security improvements compared to other servers. If your ISP has a miserable DNS server, and you type your bank’s address, you may go to a phishing site that is made to look identical to your bank’s real site, where you will voluntarily give away your username and password, and potentially your money.
I have written a script called
time_dns that by default takes the 100 most trafficked websites, Google, Facebook, Yahoo, YouTube, etc. aggregated by
Alexa and looks up their IP address against each DNS server and calculates an average. Run the script once or multiple times when you are most active on the Internet. Then choose the first 2 fastest servers under
Results. Instructions on how to change your DNS servers is beyond the goal of this article. Each router is different.
You can see the script at
GitHub. Note, if click
download at GitHub, you will download all my scripts; if you do not want to download everything, just get
time_dns.