Many of us access the same website dozens or hundreds of times a day, making the combined total time that we wait for page requests a huge bottleneck to our productivity.

One of the lesser considered reasons for lengthy page requests is DNS lookups. When you point your eyes to your browser status bar, and it reports "Looking up www.website.com", you're in the middle of a DNS lookup.

If you have any knowledge of DNS, you might ask, why isn't my Operating System's DNS cache working. I don't know the answer to that, but going back to the original issue – accessing a website frequently throughout the day – luckily, there's a solution.

It's called the local hosts file. This file is sort of like it's own Domain Name server. Your operating system will perform a lookup on the local hosts file before sending of the request to remote DNS servers beyond your control.

In windows, the hosts file is located at C:\Windows\System32\drivers\etc\hosts

In OS X, Linux /etc/hosts

Open up this file in a text editor. You'll likely already have at least one entry, called localhost. This line should demonstrate the basic syntax required to create an entry.

So, for example, if your website is served from a web server at IP address 55.66.77.88, you would place the following line in your hosts file:

55.66.77.88    www.mywebsite.com

Then, say good by to lengthy DNS lookups! At least from your PC.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *