Wednesday, December 16, 2015

How to Block Websites On Your PC


वेबसाइट को ब्लॉक करना
DNS, which stands for Domain Name System, can convert the exclusive IPv4 or IPv6 addresses to meaningful names, and then translate the characters back to IP addresses. For example, when you want to visit a website, DNS will tell your web browser the real ip address of it and then web browser will download the web page directly from that IP address.
As you may expect, the process of translating IP addresses to website names will consume some time, which could cause access delay. Particularly, if the DNS servers are down, you will not be able to visit most websites through their URL, which isn’t uncommon.

Hence, it is necessary to make a list for mapping hostnames to IP addresses. That is whatWindows HOSTS file does. On most Windows systems, the HOSTS file content is used preferentially over other methods, such as the DNS. 

With the proper use of Windows HOSTS file, you can accelerate the access speed of favorite websites, test a website locally and even selectively block certain websites. 

In fact, blocking websites through the HOSTS file is an effective way to do it because it blocks it across all the browsers. 

Edit HOSTS File Manually 

Windows NT platform systems including Windows 2000, Windows XP and Windows 7 have their HOSTS file in the path%SystemRoot%\system32\drivers\etc\ (“%SystemRoot%” is relative path, which depends on the system-wide environment variable, it should be C:\Windows or C:\WINNT in most cases). 

Basically, you just need to type the above mentioned path in Windows search bar (or run box) to get to the “etc” folder where you’ll find the HOSTS file.

You can use any text editor to open the file and edit it manually.

Note: For Windows 7 users, there’s one more step. Type “Notepad” in Start Menu search bar, and then right click on the “Notepad” item, choose “Run as administrator”. Now you can open HOSTS file with “File -> Open” menu in notepad

The HOSTS file contains lines of text including an IP address and one or more host names. You can add the mapping relationship of each websites. The comment lines are indicated by a hash (#) character, which will be ignored by system.

To block a website, simply add a line like this:
127.0.0.1 example.com

127.0.0.1 (or Localhost) is the standard host-name given to the address of your computer. You mapped the website name to your PC, hence you can’t visit the site any more. So if you want to block Facebook, just add this line into Hosts file: 
127.0.0.1 facebook.com

No comments:

QUESTIONS FOR CAMPUS INTERVIEW with answers 65

Q1:- Differentiate between RAM and ROM? RAM stands for Random Access Memory. It can store information and have new information stored o...