In this tutorial, I am going to show you how to block a website on a local Windows computer so there is no way to access it.
1. Navigate to C:\Windows\System32\drivers\etc using "My Computer"
2. Right click hosts --> Open With --> Notepad
3. You might already see a line at the bottom that looks similar to this...
127.0.0.1 localhost
The first number is an IP address that it will simply redirect to. So if you type localhost in your browser it will look at 127.0.0.1. The second number is the IP/domain you want to redirect. To block a website do the following. I will be using an example of google.com
1. Make a new line at the bottom on the hosts file and type...
Code:
127.0.0.1 google.com
127.0.0.1 www.google.com
Make sure you do BOTH
Code:
google.com AND www.google.com
as they are looked at differently by your browser.
2. Save your file, open your browser, and try to type in the URL. The page should not be found.
I did this trick at work with this girl I work with. She is on MySpace ALL day. So this is what I did...
Code:
"MY_SERVER_IP" myspace.com
"MY_SERVER_IP" www.myspace.com
When she visited myspace.com, it would look at my web server for the website and the website on my web server is coded so the browser would move all over the screen and it says she got a virus on the work computer... I'm such an asshole
This has been tested on Windows XP, I'm not sure how it will cooperate on Vista and Windows 7 with the new security updates. Have fun messing with people!
