Step1
Know the list of sites you want to block
make sure your computer has an internet connection.
Step2
Standard look of DOS Window
Open a command window (DOS), and type in nslookup
Step3
Jot down this IP address for future reference
type in the name of the site you want to send them to when they visit one of the sites you don't want them to go to.
Ie. www.google.com , www.eHow.com etc...
Step4
Found on XP
Find the "HOSTS" file on your PC.
HINT: on Windows(Pre XP ) it will be located under
C:\WINNT\System32\Drivers\etc
On WindowXP machines it will be located under
C:\WINDOWS\System32\Drivers\etc
Step5
Double Click on the file named "HOSTS", there is no extension for this file.
Step6
Select NOTEPAD to open and edit this file with
Your PC should ask what program you want to open this file with.
Select "Browse" and the select Notepad as the program you want to use.
Step7
basic HOST file setup
There are some basic instructions on how to enter things in here.
127.0.0.1 is the universal IP address for the "loopback address" on every windows PC in the world.
By using this entry, any request to a certain address will send the request back to your PC.
Step8
Don't just block them, send them somewhere useful
Start by entering the IP address you jotted down earlier. Followed by the name of the site you want to block
Step9
One drawback to this is that you will need to enter the domain name twice
Once as the domain name, and once with WWW in it.
Step11
Open browser and try to visit the site, you should be redirected back to where you wanted them to go.
if you use 127.0.0.1 and are not running a web server on your computer then your browser should return the standard ( 404 page not found error )
Comments
postclimber said
on 3/5/2008 hi this postclimber i have tried this procedure in blocking the unwanted sites on my workstations I have followed the procedures step by step but when i tried to browse again the said block site i can still browse on it. And what make me disturb with this procedure is that
i found another site with same procedure as with this, but the difference is that the IP they are using is the loopback IP
ex; 127.0.0.1 www.playboy.com while this site requires the IP we got from DOS PROMPT when we type NSLOOK and tried both procedure but none of the two works even if restartng the computer wont do good. Pls. help me how to get this procedure works I badly needed it to block porno sites. Thank you so much
Postclimber
webzarus said
on 1/30/2008 Update Step 4 with full path on Windows XP machines, thanks to a user who pointed it out.