Tuesday 6 May 2014

How to block some websites without any software?

DNS(Domain Name Server)  translates the website url to its IP address through our ISP (Internet Service Provider) DNS Server. We can also configure the url to IP translation on our PC by itself which saves time to translate url to IP address and it also helps us to block some websites with a simple trick. Every Windows Computer have a hosts file which can be used for url to IP conversion so time to translate website url to IP address can be saved. Path of hosts file in various Microsoft Windows Operating Systems is as

Windows 95 - C:windows\
Windows 98 - C:\windows\
Windows Me - C:\windows\
Windows 2000 - C:windows\system32\drivers\etc\
Windows XP - C:\windows\system32\drivers\etc\ 
Windows NT - C:\winnt\system32\drivers\etc\
Windows Vista - C:\windows\system32\drivers\etc\
Windows 7 - C:\windows\system32\drivers\etc\
Windows 8/8.1 - C:\windows\system32\drivers\etc\

How to Configure host file?



Step 1. Open the file names host from the path depending on your operating system.

Step 2. Open the host file in notepad by right clicking and choosing open with option.



# 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

74.125.200.139 www.google.com
127.0.0.1 www.facebook.com


Step 3. Now type the IP address of Google.com website at the end of the file and then after giving a space type the url www.google.com which will save time to translate the url to IP address. this will speedup the website surfing. 
This tip can also be used to block the websites by giving localhost IP address(127.0.0.1) or any other websites IP address to the website we want to block.

Step 4. If we want to block www.facebook.com then we can type any one line at the end of the host file.

127.0.0.1 www.facebook.com (It will open Blank page)
or
74.125.200.139 www.facebook.com (It will open google page when we will open www.facebook.com on our PC).

You will not be able to save the file after editing because of administrator right so take administrator rights before editing the host file. Leave comment if you want to know how to take administrator rights to edit system files.


With this simple trick we can redirect any website to any other website or we can speedup our website surfing by providing correct IP address to its url. This trick helps in both cases. To block multiple website you can use

127.0.0.1 www.abc.com
127.0.0.2 www.xyz.com
127.0.0.3 www.pqr.com
.
.
.
127.0.0.254 www.aaaaaaaa.com

No comments:

Post a Comment