PDA

Click to See Complete Forum and Search --> : Editing Hosts file to speed up browsing


yanksfan
October 10th, 2002, 11:17 PM
All those who have AOL/Dialup:

You do know how slow it is, right? Well, some of the time it takes to find the page (before it starts to load) has to do with contacting a DNS server (domain name server), translating the name you typed in (www.whatever.com) into a number so it can be located on the internet.

So since AOL's DNS servers are probably slow since they are overworked, here's a workaround that you can do to completely bypass the DNS with sites you visit often.

Windows keeps a small file called the hosts file, which is like a small, local DNS server. By putting web site names and their corresponding IP numbers here, you could speed up the time it takes to load a page.

(Note this is completely safe, anything you do is completely reversable, but keep a backup handy in case you forget waht the original looked like.)

-----

1) Think of a site you visit often. Get a command prompt (start->prgs->accessories->MS-DOS prompt). Type in 'ping www.whatever.com', replacing whatever.com with the site you visit often (and without the quotes.) Then hit enter, and look for the number separated by for dots. Write it down.

Ex:
Pinging www.whatever.com [192.168.2.1] with 32 bytes of data:


See the number I was talking about? Its the one in brackets.

2) Now open up your hosts file with notepad (if you have Windows 95/98/98SE/ME, it's probably c:\windows\hosts; make sure it's NOT hosts.sam, that is only a sample. If you can't find it, search for it, and if it doesn't exist, create one in C:\windows. If you are running Windows NT or 2000, you should know about this anyway ).

Now type in that number on a separate line if there are other entries in there. Then next to it type in the site. Save it. You're done! Wasn't that easy? Repeat steps 1 and two for any other sties you want to. For the changes to take effect, restart aol or your browser (exit the prg and start it again), or to be sure, just restart your computer. If you're not sure how the hosts file should look, look at this example:

192.168.2.1 www.whatever.com
192.168.2.2 www.something.com


**IMPORTANT NOTES: Just make sure each entry is on a seperate line. Also, make sure you put the number before the address, not vice versa. And, copy the number EXACTLY, INCLUDING the dots. That's it!

-Mike

nebulus200
October 10th, 2002, 11:48 PM
You should also have mentioned potential pitfalls of doing this:

* What happens when the name is updated? Because you have it set locally, you might never get the web page after the name changes (this does happen).

* It might interfere with sites that use DNS as a load balancing scheme (for example, cnn.com resolves to several different IP's and depending on the answer returned by DNS varies which sever you visit). A static address that doesn't consider this could also cause problems and even make your connection slower.

* The amount of DNS traffic versus your web traffic, when compared in bytes transmitted/received (and therefore time), especially when visiting the same site (because of the use of DNS caching), IMHO is very minimal. The potential benefit would be if your DNS server is very loaded and therefore slowing down response of name queries...

Otherwise good info.

Neb

EDIT: corrected DNS traffic statement

yanksfan
October 11th, 2002, 12:23 AM
Good points, I forgot about them... :eek:

* What happens when the name is updated? Because you have it set locally, you might never get the web page after the name changes (this does happen).

I thought the search order was hosts then DNS anyway, so if the hosts file was incorrect, then it would contact the DNS server..?

jlightfoot1
October 11th, 2002, 01:08 AM
Download Fastnet99 from Cnet or somewhere. This small program will verify and backup this file for you. It will search the IE cache or Netscape and the favorites folder and add these entries as well. Maintenance schedules can be set up and it makes quick work of page changes by verifying only the selected page. Been using it for several years, and swear by it. Try it....

linuxelite
October 11th, 2002, 05:23 AM
I thought the search order was hosts then DNS anyway, so if the hosts file was incorrect, then it would contact the DNS server..? I am pretty sure that is how it works. The host file is checked first, DNS is used when a site isn't found, for example, like norton AV will insert the IP address of it's autoupdate server in there, but even if you deleted it, it would still work. At least, mine did.

ammo
October 11th, 2002, 06:37 AM
The host file lookup only fails (and reverts to dns) if the hostname isn't defined. If it is defined but points to the wrong IP you get screwed...

Ammo

micael
October 11th, 2002, 07:53 AM
There are many different programs available which caches all resolved DNS names and thus way can speed up your internet connection.

One of them worth to give a try are Outpost firewall, many people do already use this personal firewall but I thought it was worth mention since new members arrives every day.

Source: www.agnitum.com
Outpost personal firewall features:

FREE! You can enjoy Outpost Personal Firewall's cutting-edge protection on your computer, free. Outpost protects you and your family by

Filtering the viruses, worms, and trojans out of your emails;
Preventing trojans from infecting your computer and sending your personal information to the bad guys;
Blocking attacks from hackers and crackers;
Protecting your children from illegal, inappropriate web sites; and
Speeding your Internet access by eliminating ads, cookies, DNS caching and other Internet nuisances.

~micael

mrleachy
October 27th, 2002, 07:48 AM
thanks for the cool tute, saves having to type in horrible long addresses as well, one of the sites that i use for uni is a good example, can shorten a horrible subnet address to just one word which is rather useful :)