Network Administrator – File hosts allow users to identify the domain name (website) which is associated with the IP address. This file is a higher priority DNS server so that DNS server can indicates that facebook.c-o-m is associated with a particular IP address, but you could allow Facebook.c-o-m to attach to any website you want. Filehosts can be used to block Web sites, redirect them, quick access to the Website or create their own internal domain.
Editing file hosts
To edit the hosts file, open Notepad (or any word processor user want, such as Notepad ++) as administrator. To do this, click Start, type Notepad in the Start menu, right-click the Notepad icon and select Run as Administrator.
After opening program, click File > Open in Notepad window and then point to the folder according to path C: \ Windows \ System32 \ drivers \ etc. Click on Text Files box on the lower right corner of the window, select All Files and double-click the hosts file.
Any change in the file hosts will take effect immediately after you save the file without having to restart the computer. Note that if you want to add more input setting to file hosts, make sure that each setting of input is located on a separate line.
To block a website, add a line with the following syntax at the end of the hosts file:
127.0.0.1 website name
127.0.0.1 is the local IP address of the computer. When you access the website above, the computer will attempt to make a connection to itself (127.0.0.1). Therefore, the system cannot find Web Server and connection will fail immediately, preventing effectively the Website loading process to the computer.