this will become our back up copy should we ever need one
Ok first off we need to open the correct file. let's do that now.
1) open C drive or your designated hard drive, which is D drive for some user's.
2) go to the windows folder and open it
3) now open the system32 folder
4) open the drivers folder
5) open the etc folder
6) now we see a file called hosts. we need to right click on this file and choose open
with. choose open with, select from list, and we use notepad to open the file.
7) we need to scroll down where we see 127.0.0.1 localhost
8) skip a line under 127.0.0.1 localhost.
this line should be empty, and under this line here, we will start blocking sites.
9) now we will enter, 127.0.0.1 www.sitename.com #blocked, do not add http://
10) click the close button when your finished and say yes when asked to save changes.
Example of a host file with blocked sites:
QUOTE
# Copyright © 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:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
127.0.0.1 www.myspace.com #blocked
127.0.0.1 www.youtube.com #blocked
127.0.0.1 www.facebook.com #blocked
you get the point now. Just be careful not to remove the "127.0.0.1 localhost" line if you're removing entries. #
# 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:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
127.0.0.1 www.myspace.com #blocked
127.0.0.1 www.youtube.com #blocked
127.0.0.1 www.facebook.com #blocked
Basically, the "127.0.0.1 www.facebook.com" line links the "www.facebook.com" domainname to the 127.0.0.1 IP address, which is always your own computer (=the local host/computer). So any data going to www.facebook.com will go to 127.0.0.1 and simply be discarded.
i used the "#" (pound sign) blocked to let me know i blocked them, but that is optional.
notice no pound sign's in front of my entries, that is because these are active entries, that the computer will read.
everything else that has a pound sign in front of it, is just a comment, and the computer will not recognize that as a command.
Vista: Users must run Notepad as admin then navigate to the host file. Be sure all files is selected from the drop down menu so you can see the host file.