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. File hosts 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.
Users can also use this tip to redirect this site to another site. For example, after redirecting from facebook.c-o-m to twitter, when entering facebook.c-o-m into browser address bar, the destination will be Twitter.
First, we need to know the IP address of Twitter. You can find the address by ping command in command window (click Start, type Command Prompt and then press Enter). You type “ping Twitter.c-o-m” in the window command to see the IP address of the page.
Now, add the following to file hosts:
This line is for computers linking the facebook.c-o-m domain with the IP address of Twitter. In the future, each time you visit facebook.c-o-m, the browser will redirect to the Twitter website.
Quick Access Website
You can also use this tip for quick access from any Web site on the computer program. For example, if you are a follower of Twitter, assign “t” for Twitter to just enter t in any browser you will access quickly to Twitter. You need not to type .c-o-m, .n-e-t, .o-r-g or any other tail. But you cannot use space.
To do this, you only need to add the following line to the hosts file and save it:
Now enter “t” in the address bar, the browser will access immediately to twitter.c-o-m.
Assign the local domain
Hosting allow the user to create a local domain name for their computer. For example, if there is an internal server, you can name it as server and quick access it by typing server into URL browser address bar. If you regularly access the router’s configuration page, assigning “router” with the IP address of the router and typing router into the web browser address bar to access the router.
Note that you need to know the IP address of the computer or router prior to implement. Then enter the file hosts a line like the following example (192.168.0.1 is usually the address to access the router configuration):
Testing Web Server
If you are running a web server on your local network, users may want to make sure that the server will operate correctly before online on Intern-e-t. Some web servers run multiple sites at the same IP address and the websites which you get depends on the server name (host name- Hosting content) is being accessed. In this case, accessing website by the local IP address is not enough. You should visit with an address Website.
For example, if a Web server with local IP address 192.168.0.5 is used for both organization.o-r-g and company.c-o-m, you should add the following line to the file hosts on your c-o-mputer:
192.168.0.5 company.c-o-m 192.168.0.5 organization.o-r-g
After saving the file, you should try to visit both sites in the web browser. If it is correct, you will see two different websites. Server founds that web title specifies for company.c-o-m or organization.or and provides the correct website. If the web server does not operate correctly, you will have to fix before deploying server on the Intern-e-t.
These tips are very useful and can be additional security options for Windows. Good luck!