DO NOT TRY THIS AT HOME : Our text files and message bases are for INFORMATIONAL PURPOSES ONLY. DO NOT undertake any project based upon any information obtained from this or any other web site.We are not responsible for, nor do we assume any liability for, damages resulting from the use of any information on this site.
(103 votes) Published: Feb 08, 2006 7:54 p.m. In 4 Favorites Lists Viewed 1433 times
Ok i have read a number of eggs on this but none of them are really good and they don’t do a very good job explaining it. So here is a really simple explanation of how to block a website.
A Little Backround Never Hurts.
First a little about what happens when you type in a website into the adress bar. Normally the web-explorer looks on the interent for the site and if it finds the site at the specified DNS(not important to know for this) then it will upload that sites information into your browser. If we want to block a site what we need to do is to tell your internet browser to look for the site on your computer instead of the internet. To do this we are going to modify the host file.
Directions:
Ok the location of the file is for xp however you can easily do a search for "Host" or "lmhosts.sam" to find the directory.
1. First we need to get to the folder containting the host file. For Windows XP it is located here C:\WINDOWS\system32\drivers\etc and called "hosts"
2. Once you have located the hosts file copy it to your desktop so that if something goes wrong you have a back up (don’t edit the new one on your desktop), then we need to change the file extension (the letters that follow the . after the name) so that we can open it in notepad or wordpad. To do this we are going to right click on the hosts file and go down to rename. Now rename it hosts.txt, this will allow us to edit it. It may ask if you are sure about changing the file extension say yes don’t worry i will tell you how to change it back.
3. Once you have renamed the file double click on it. It should open in notepad or wordpad or some text editor. Scroll down to the bottom intil you reach a line that does not start with the # symbol.
Once you are on this line we are going to need the adress of the site we want to block.
4. For example is we wanted to block google.com we would need to add this to the bottom of the host file past all the # lines,
127.0.0.1 www.google.com
or
127.0.0.1 The adress of your site goes here
5. Once you have entered the adress and the 127.0.0.1 (which tells the net browser to look on the local computer intstead of the internet for the site) we need to rename the hosts file again so that the computer can read it. To so this right click again and rename it hosts so we are just deleting the .txt. The computer should ask if you are sure about changing the extension once again say yes. If when you try to rename it the .txt doesn’t show up and the end of "hosts" then you need to do step 5b.
5b. To make the .txt show up so tha you can rename the file you need to go to tools at the top of the folder where hosts is located. Then go to folder options, click on the view tab scrool down and unclick the "hide extensions for known file types" box now you should be able to rename the hosts file and delete the .txt at the end.
6. Now try to go to google.com and it should come up and say site not found, if it doesn’t well then you didn’t do something right try again or send me a message because there are a few exceptions that i won’t go into detail here.
Feb 09, 2006 5:10 pm - Yeah Done before by me, just reposted it in another category because i put it in the wrong one first time. And yes if you can get to these files at school it will even work at school. Thanks for the good ratings.