Block web sites

Hello, I want to block some web sites. How to do it. Here is the host file but it doesn't work.
# Copyright (c) 1993-2009 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

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost
 www.web_to_be_blocked.com  127.0.0.1 
  

Open in new window

zhshqzycAsked:
Who is Participating?
 
Dave BaldwinFixer of ProblemsCommented:
The IP address comes first.
# Copyright (c) 1993-2009 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

# localhost name resolution is handled within DNS itself.
#       127.0.0.1       localhost
#       ::1             localhost
127.0.0.1   www.web_to_be_blocked.com

Open in new window

0
 
aboo_sCommented:
save it where it should be saved, then double check that you gave it the right name and extension (blank not .txt) and check that no other program is manipulating it!

Other than that, it looks fine !
0
 
zhshqzycAuthor Commented:
Both are not working.
0
 
Dave BaldwinFixer of ProblemsCommented:
The version with the IP address first is working on my computer to block hundreds of bad web sites.  As with many things in Windows, you may have to reboot your computer to see it work.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.