Copyright © 2001-2008
Hardware and Software Specifications, Examples, Links, and other info. are valid at the publishing time. In case it become invalid use the Internet Search.
1st Published, Dec. 2004
Over 9,000,000 Hits Site Wide in 2007
Windows Host File - What is it and How to Mange it?
The Host File.
Windows Internet Explorer is set to automatically take instructions from a special file that can be found as part of the default installation of the Operating system.
The name of the file is HOST (No Extension).
In Windows 98 the file resides in C:\Windows
In Windows XP it is in C:\WINDOWS\SYSTEM32\DRIVERS\etc
You probably have a basic file already installed on your computer.
The If you already have one use Windows Notepad to open it.
If you can not find a Host file make one by using generic txt editor like Notepad.
Or use this Free Program: Host File Checker 2.2
(The Zip file of Host Checker includes a sample of host file with a lot of common "junk" serving links that can be add to the blocking lines an Host File).
Example for a File:
# Copyright (c) 1993-1999 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
# Permit this.
127.0.0.1 localhost # designate 127.0.0.1 as the local host leave this line as is.
# This is usually the End of the Default Host File. The rest is examples.
220.127.116.11 rhino.acme.com # source server
18.104.22.168 x.acme.com # x client host
#This type of entries will Block specific sites.
127.0.0.1 ibm.com # will resolve to Localhost, so No IBM.COM
#This type of entries will Block ads that come into a Banner from ads.acme.com.
# This type of entries give names to local Computers
# No need to type the IP the Main computer you can type Main into Address Bar.
# The computer with the Music Files will be called Music.
Usage Examples of the Host file.
Allow only few specific Sites.
If you have children (or employees), and you would like them to be able to log to few Chosen Sites.
First disable the DNS on the computer in question.
Log to the TCP/IP properties in Local Area Connection Properties.
If Obtain DNS is on Auto, check the: "Use the following DNS Server" and enter 127.0.01 into the preferred DNS (you can leave the second entry empty).
By doing your Browser will not be able to go anywhere since there is No DNS available.
However, the Sites that are in the permit section of the Host file (as shown before) will be resolved, and would appear in the Browser.
Accelerate DNS Resolution.
If you visit often the same sites. Find the IP address of the Site (The Firewall Log is a good place to find the IPs), and enter the IP with the corresponded address as shown before in the permit section of the Host file.
Your browser will save the time that it takes to look through External DNS resolution and will log directly to the Site.
Most Websites Advertisements (Ads) do not come from the actual Web that you log to. It comes into the page from an Advertisement Server. If you right click on an Ad. and click on properties you might see the address that it is coming from. If you visit frequently the same sites and there an annoying Ads that you would like to get rid of, put the Ads address in the block part of the Host file.
The Zip file of "Host File Checker" program mentioned above includes a sample host file with a lot of common "junk" serving addresses that can be add to the blocking lines of your Host File.
Here is a small sample of "Junk" sites. Putting the localhost IP in front of the address will block the Site.
Host File does work with wildcards to block a range of servers, such as *.site.com
HOSTS file can only map host names to IP addresses.
Mapping an IP to another IP, or a host name to another host name does not work.
The HOST file is a simple unprotected text file. Take into consideration that if you are using it on someone else computer and the user is computer savvy he/she can defeat your "Good intentions".
If necessary you can keep the Host file Hidden by using inexpensive shareware like this: Folders XP
© 2001-2008 EZLAN.NET. All Rights Reserved.