# WebAccelerators and Hosts file



## Bryan (Jul 3, 1999)

Here is what the imfamous WebAccelerators do for you. Though I have said many times in the past they do no good, I thought it may help some without installing a WebAccelerator and causing themselves alot of problems. So here it goes. You can easily do it yourself and at the same time understand it's function, so if you have problems in the future getting to a site, you will know why and be able to fix it. 

If you have W98 you can speed up the time it takes to get to a site by creating a Hosts file in the Windows folder. There is already a sample Hosts file you can use as a template. The file is Hosts.sam Just copy it to the Windows folder and rename it Hosts. No extension !!

Note, make sure you do not already have a Hosts file in Windows folder.

Close InternetExplorer.

Now open the file Hosts using Notepad. You will see a line that reads 127.0.0.1 local host or 127.0.0.1 default, leave it alone! Right beneath it add lines for your most visited sites.

For example 

127.0.0.1 local host
204.71.200.75 www.yahoo.com 
204.152.190.25 www.altavista.com 
207.46.130.26 search.support.microsoft.com 

After you add the lines, remove all of the comment lines(they have a "#" in the first position) above the four lines, if you used the hosts.sam as a template, and just click on File>Save 

Now Start IE and goto www.yahoo.com. You should notice a small change in how fast it gets to the site. 

If you want to test that it works or play around with it to see how it works. Change the IP address for the www.yahoo.com line to 206.129.166.164

When you goto www.yahoo.com you will actually end up at www.infospace.com because 206.129.166.164 is the IP address for www.infospace.com 


By playing around with the IP addresses, hopefully you understand that your browser now looks to the Hosts file first for the URL. If it finds it in the Hosts file then it uses the IP address in the Hosts file. 

What this Hosts file does is eliminate the need for your system to take the URL you requested and go out to your ISP's DNS server to get the sites IP address. It does not save an enormous amount of time but it can speed things up a bit. Especially if your ISP's DNS servers are busy, just always slow or even down. If they are down you will still get to the sites you have in your Hosts file because it does not need the DNS server to get the IP address. 


Note, you should only put site URL's in the file that are pretty static like Yahoo, etc..
Site IP addresses can change. If a sites IP address changes and you don't update your Hosts file then you will get "Cannot Find page". 


BTW, I don't suggest this for the casual PC user, but if you are like me and don't have anything better to do, then it can be something fun to play with. Also, if you want to find out the IP addresses to any sites simply get to a Dos prompt from within Windows while connected to the net and key in ping www.whatever.com (with "whatever" being the sitename) and press enter. The IP address will be returned on the screen for you to see.


----------



## TONEYS (Sep 1, 1999)

Excellent,
bhesson you should get the award for Tip of the Week. I've wondered for sometime if this was possible, just didn't know the right path. I have several investment site's that I frequent and this works wonderful.

THANKS


----------



## Bryan (Jul 3, 1999)

Thanks, glad you liked it. I have one setup on my PC and it does save a little time plus it's fun to play with. One other thing I did was to setup a shortcut on my desktop to the Hosts file that way when I need to edit it I can just click on the icon.









Note, just remember if you have any trouble getting to a site that is in the Hosts file, just comment out the line in the Hosts file by putting a "#" in the first position of the line followed by a blank, then save it and retry the site. It could be that the IP address changed.


----------



## Mulderator (Feb 20, 1999)

Well--I'm still skeptical--I think bhesson may be showing us a way to slow our computers down so he can get to the posts quicker and sneak an answer in thereby increasing his post count!!!

[This message has been edited by Mulder (edited 02-21-2000).]


----------



## Bryan (Jul 3, 1999)

Actually Mulder, I was thinking about asking to have my post count reset to zero just to see how quickly I could pass you *again*.


----------



## Anne Troy (Feb 14, 1999)

Egads! I missed this one, and I loved it, so I'm making it come back to the top so everyone can see bhesson's terrific information, not to mention his flaming at mulder. Gotta love it.

------------------
~dreamboat~
Brainbench MVP for Microsoft Word
Brainbench


----------



## DonCroozione (Nov 17, 2000)

AHA.....I wondered where the big boys played.....LOL. So if you see me sneaking up behind you (Techguy, Bhesson, Dreamboat, Mulder, etc.)on the Information Superhighway, its merely because I track all the threads you guys reply to in hopes of gaining more insight on this electronic managerie of wires and silicon I call my computer. 

Does this make me a TSG groupie? LOL. Well, beats the heck out of followin' some group of longhairs around this great land hoping for backstage passes.

The Don 

------------------
To all who pass through, instead of around, the journey makes the end very sweet indeed.


----------



## Rhayne (Dec 12, 2000)

Nice tip, there, but there's one more part to it that -really- speeds things up for sites you visit a lot. When on a page, right-click and select 'View Source'. In the source, find the sections that point to ads (usually at the top and bottom, but not always) and drop THOSE servers in the HOSTS file with the IP addie 127.0.0.1. Bye bye ads, and since there is no bandwidth wasted on trying to load them, your intended page is loaded even -more- quickly. (Note: Do NOT rip out the server that has yimg187 in it, you'll regret it handily as it serves -several- major sites.) Now -thats- havin' fun!


------------------
--"I have travelled to cities whose names I can't pronounce, but it doesn't matter because I have removed them from the Earth."--George S. Patton


----------



## Sharon D (Feb 16, 2001)

Hi Bryan. I know this is a fairly old thread but I have a simple question(which I hope isn't a dumb one). After you copy the Hosts.sam template to Windows and rename it to Hosts. Do you edit out the #'s in the template along with the comment lines before 127.0.0.1 local host? 
BTW, I also have a LMHosts.sam as well as Hosts.sam
Thanks. sharon


----------



## Bryan (Jul 3, 1999)

127.0.0.1 localhost
216.32.74.52 www.yahoo.com
205.166.61.198 forums.techguy.org

While it's really not necessary, for simplicity sake, delete everything from the Hosts.sam file. The 127 line should be the first in the file. I included the Yahoo and Techguy lines as examples of the format that the following lines should follow.

Forget the Imhosts.sam file. It's not relavent.

Be sure you save the Host.sam file as just Hosts with no extension or it won't work. And to be sure you get it right, put an IP for say google next to the www.yahoo.com entry as a test. If you try to goto www.yahoo.com, you should end up at www.goggle.com if you've setup the Hosts file correctly. Here's how the Test line should look

216.239.39.100 www.yahoo.com

BTW, just be sure you remember, IP addresses can change so if you have problems getting to a site, remember to try commenting out the line and then try the site. To comment out a line you'd do this,

# 216.32.74.52 www.yahoo.com

[Edited by Bryan on 08-17-2001 at 08:36 PM]


----------



## Sharon D (Feb 16, 2001)

Ok. That clarifies it for me. I just wasn't sure if I should edit out those #. Thank you so much Bryan for replying as quickly as you did. I now how have something fun to experiment with this weekend. 
Have a good one.


----------

