The magical!!! of the domain name resolution file Hosts file

Source: Internet
Author: User

How to modify the Hosts file.

Location of Hosts file: Xp,server2008,win7 and other systems locate the hosts file in the C:/windows/system32/drivers/etc folder and open Notepad (Windows 9x/me system in c:/ Windows folder to add a separate row of records in the format of the IP address domain name. For example:
72.14.219.190 www.hbcms.net
Note: There should be at least 1 spaces between the IP address and the domain.
Make sure you save the file after you modify it. How to know the IP address of the domain name is already in effect. On your computer, please follow these steps: Start--> run--> enter cmd-->ping domain--> return view results display similar Reply from 220.181.31.183:bytes=32 time=79ms TTL =53
In the middle of the 220.181.31.183 is the IP address of the domain name closed all the browser, reopen, test you just add the domain name can be normal access if the access is not normal, please follow the 3 steps to check if you just set the domain name is the correct IP address

the domain name resolution file hosts what files. What's the effect?

1. Speed up Domain name resolution

For Web sites to visit frequently, we can configure the domain name and IP mapping relationships in hosts so that when we enter a domain name computer, we can quickly resolve IP without requesting a DNS server on the network.

2. Easy LAN Users

In many units of the local area network, there will be a server for users to use. However, because the LAN rarely set up a DNS server, access to these services to enter the difficult to remember the IP address, for many people is quite troublesome. Now you can give these servers an easy to remember name, and then set up an IP map in the hosts, so we will enter the name of the server later on the line.

3. Screen Web site

Now a lot of web sites without user consent to install a variety of plug-ins to your computer, some may be trojans or viruses. For these sites we can use hosts to map the site's domain name to the wrong IP or its own computer's IP, so no access. For example, do not want to visit www.XXXX.com, then we write the following in the hosts:

127.0.0.1 www.XXXX.com #屏蔽的网站
0.0.0.0 www.XXXX.com #屏蔽的网站

So the computer resolution of the domain name to the native or wrong IP, to achieve the purpose of shielding.

4. Smooth Connection System

For Lotus servers and some database servers, access is inaccessible if you enter the IP address directly, and you can only enter the server name to access it. Then we configure the hosts file, so that the input server name can be successfully connected.

Finally, it is pointed out that the Hosts file configuration mapping is static, if the computer on the network changes, please update the IP address in time, otherwise it will not be accessible.

5. Force the designation of a domain name corresponding to an IP address

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.