The Windows hosts file is used to map hostnames to IP addresses forcing the computer to use that mapping instead of the one provided by the DNS server. This can be useful in several situations like speeding up Internet surfing or making sure that a website is working fine after moving it to another Internet server before the new IP has propagated.
The Windows hosts file is basically a text document that lists IP addresses on the left and hostnames on the right. The hosts file is located in system32/drivers/etc/ of the Windows folder. It can be edited with any text editor.

Optimizing the hosts file can speed up the parsing of the file and keep the DNS client service enabled while using a big hosts file.
The hosts optimizer will automatically remove duplicate host names from the hosts file, remove all comments including entries that have been made a comment to disable them and put a maximum of nine host names in a single line if they point to the same IP address.
The program will automatically created a backup of the hosts file before optimizing it. It has to be noted that the DNS cache needs to be flushed whenever a change is made to the Windows hosts file if the DNS Client service is enabled.
Hosts Optimizer can be downloaded from the abelhadigital forum. The program is also part of the hosts manager HostsMan.
Enjoyed the article?: Then sign-up for our free newsletter or RSS feed to kick off your day with the latest technology news and tips, or share the article with your friends and contacts on Facebook or Twitter.Related Articles:
How To Edit, Reset The Windows Hosts FileHosts File Software Overview
Upload Files To Multiple File Hosts
Swap Hosts Files Easily With Hosts Manager
Gazup Multiple File Hosts Uploader

HostsMan is a brilliant little freebie!
I ended up with 50% CPU usage from svchost.exe because of this. Thanks, but no.
I looked at the hosts file tonight.
I don’t use it myself, but Spybot Search & Destroy does. What I noticed is that Spybot inserts TEO entries for every address in the file, one with www in front and one without. Like this:
127.0.0.1 www.onj
127.0.0.1 onj
127.0.0.1 www.pu
127.0.0.1 pu
127.0.0.1 www.yes
127.0.0.1 yes
# End of entries inserted by Spybot – Search & Destroy
Is it really necessary to do what Spybot is doing?
Obviously, there are twice the number of addresses to process using their methodology which probably slows down anyone doing lookup’s in the hosts file.
I had to edit the domain names. Lets look at www.ghacks.net as an example. .net is the top level domain, ghacks is a subdomain of that and www is a subdomain of ghacks. Both www.ghacks.net and ghacks.net are independent from each other. Most webmasters redirect both to the same domain but that does not have to be the case. About the hosts file. I actually have not tried it if entering example.com is sufficient to block all requests to subdomains as well. I think I remember that the hosts file supports wildcards, e.g. *.example.com to block everything from a domain which means my guess would be that the hosts file only blocks the hostname that is shown and nothing else. But I have not verified that.
1. In the past, IE apparently had problems with large hosts files created by Spybot, apparently resulting in problems opening IE (either slow or would not open at all). I personally haven’t seen this problem in a while, yet I have a large hosts file, so it appears that the problem was with IE and not the size of the hosts file.
2. There is a good write-up on hosts file here:
http://vlaurie.com/computers2/Articles/hosts.htm
3. This site says that you CAN use wildcards:
http://www.ezlan.net/host.html
So:
127.0.0.1 *.sitename.com
SHOULD be equivalent to the two entries of:
127.0.0.1 www.sitename.com —AND—
127.0.0.1 sitename.com
can anybody provide a direct link to download host optimizer