Access Denied



Free blocking tips

Free tools & programs

Content Filters

Antivirus Programs


Online virus scan


Webroot Software Inc.


If you’re looking to do some basic filtering / blocking web sites on your computer(s), or want to prevent people from going places on the internet they don’t belong, one of the easiest ways is through the use of the hosts file. When the typical computer goes to a web address, it contacts a DNS server. Simply put, a DNS server translates the website name into a series of numbers, called an IP, or Internet Protocol address, typically a series of 4 numbers, such as

I will not get into a full explanation of the reserved IP ranges, TCP protocols, etc here, but will attempt to explain in a basic manner how you can use this information to assist with blocking websites on your personal computer. 

The hosts file.
Normally, before your computer contacts the DNS server to translate the web site name into the corresponding IP address, it first reads a file on your computer, simply called HOSTS. On a modern Microsoft Windows computer, the hosts file is located in the c:\windows\system32\etc\drivers folder. If you are still running windows 95 or 98 it is located directly in the windows folder. Occasionally, a computer manufacturer or installer may install Windows to an alternate directory, often Winnt. Either way, unless you are running Windows 95 or 98, the easy way to get to the file we want to modify is to click on the start button, and type or paste this in:


Then click “OK””, and you should see the contents of the folder displayed.

Open the Hosts file. Windows should ask what you would like to open it with. Choose notepad.

You should see something like the following on the last few lines:

# For example:
#     # source server
#       # x client host    localhost

Everything with a “#” in front of the line is commented out, and not read by the operating system.

Note the last line is not commented out with a “#”, meaning it is telling windows the the computer named “localhost” is located at the IP address of

Here’s were the fun begins!

For example, if you wanted to prevent someone from going to to “”, you would add a line below the last line, like this:

Your computer would then think “” is located at, which is actually your own computer.
Alternately, you could point it to a different IP address, like this:

In this case, if someone put in the web browser in that computer, they would actually end up at google.

To find an IP address for most sites, you can simply go to start, run, type in cmd (or command in windows 95/98), and click ok. You will then be at a DOS prompt, also known as a command prompt. From the command prompt type the following line:


substituting with the correct name of the website you wanted to find the IP address for. You should see something like the following:


Pinging [] with 32 bytes of d

Reply from bytes=32 time<1ms TTL=63
Reply from bytes=32 time<1ms TTL=63
Reply from bytes=32 time<1ms TTL=63
Reply from bytes=32 time<1ms TTL=63

Ping statistics for
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
  Minimum = 0ms, Maximum = 0ms, Average = 0ms


The IP address for in this case is

To exit the command prompt, type “exit”, and hit enter on the keyboard.

Keep in mind this is very easy for your kids or employees to change, if they know what they’re doing, and that there are always ways around things, but this is often a good inexpensive way to prevent people from going places you’d rather them not go to.

[Home] [Content Filters] [Antivirus] [Easy things] [Free Tools]