You want to increase the speed at which you connect to web sites.
The HOSTS file is a plain text file that you can create or edit with a text editor like Notepad, and that resolves hostnames with their corresponding IP addresses, without having to go out to a DNS server. To use it to speed up web access:
One of the causes of slowdowns in accessing web pages is the way that your PC uses the Domain Name System (DNS). The Internet can't understand plain English words that you use to visit a web site, such as http://www.oreilly.com. Instead, it needs to know the numeric IP address. So whenever you type in a hostname, such as http://www.oreilly.com, that address needs to be resolved to its IP address, such as 184.108.40.206. DNS servers automatically provide that name resolution.
It takes time to send your request to a DNS server, have the server resolve the IP address, and then send the IP address back to your PC. You can speed up the process by creating or editing a local HOSTS file on your own PC that contains hostnames and their corresponding IP addresses. When you create one, XP will first look into the HOSTS file to see if there's an entry for the hostname, and, if it finds it, it will resolve the address itself. That way, you won't have to go out to a DNS server and wait for the response before visiting a web site.
You'll frequently come across software on the web that promises to speed up Internet access by changing a variety of "hidden" settings on your PC. It's questionable whether changing these settings has much of an effect on Internet speed, especially if you have broadband, such as a cable modem or DSL modem. And many of these programs also make changes to your HOSTS file, which, as this recipe shows, you can do yourself. So be wary of paying for Internet speed-up programs, because it's not clear that they actually have much of an effect.
If you use this recipe to edit your HOSTS file, make sure that you check the file regularly and keep it up to date, or else you may deny yourself access to certain web sites. For example, if the http://www.gralla.com web site were to change its IP address, but your HOSTS file kept the old, incorrect address, your browser would not be able to find the site, because it would be given the wrong addressing information.
For information about how you can use the HOSTS file to block ads on the Internet, see the O'Reilly WindowsDevCenter article "Kill Internet Ads with HOSTS and PAC Files" at http://www.windowsdevcenter.com/pub/a/windows/2004/03/30/hosts.html.