Kitz ADSL Broadband Information
Plusnet Broadband
support site  Support this site
PayPal Donate

site index
site search

adsl bar

Hosts File

adsl bar


There may be times when you wish to stop your browser accessing certain websites.
One of the easiest ways of doing this is to amend your hosts file.

Soemthing to note is that some malware and viruses use the hosts file to stop you accessing certain sites (such as Symantec etc) in order to stop you being to clean up your PC, so if you are infected and cant access AV sites then its worth checking your hosts file.

First of all you need to locate the host file on your PC, which should be in the following directory:-

Windows 98/ME = C:\WINDOWS

The file will simply be named "hosts" and will not have an extension, however it can be opened in notepad.

When you open it, it will look like:-

# 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
# space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
# # source server
# # x client host localhost

What you now need to do is add too the bottom of that list, below localhost

obviously substituting the name of the websites you wish to block.

You can add as many lines as you want, but do not delete the " local host" line.

Save the changes and close notepad.

How it works.

~ Every website on the internet has an IP address.
for e.g. resolves to [].

~ The hosts file is a list which ties up website addresses to an IP.

~ Normally when we type "" into our browser, unless that site is listed in the hosts file, it will use a DNS server to look up the IP address of that website before it takes us there.

~ Now... all computers have an IP address that refers to itself which is called the localhost, and has an IP no

~ So by telling your hosts file that a particular websites IP is, your PC wont try to send a request to the DNS server because it assumes it is local.

~ Therefore if you amend your hosts file to say "", this would make that particular site unreachable.

How else you can use the hosts file.

You can speed up the time a website takes to load (really only useful if on dial up), by putting the IP no of frequently used websites next to the website address, for eg.

Because you have amended your hosts file to already have the IP for, this saves your PC having to use a DNS server look up the IP.



Copyright © Kitz 2003-
All rights reserved
Unauthorised reproduction prohibited
Valid HTML 4.01 Transitional adsl 60 spacer

|| Broadband || ISPs || Tech || Routers || Site || Wiki || Forum ||

| About | Privacy Policy |

adsl 60 spacer Valid CSS!