Change Hosts file in Windows

Source: Internet
Author: User

Hosts is a system file without extensions, you can use Notepad and other tools to open, its role is to use a number of commonly used Web site domain name and its

The IP address should be set up an association "database", when the user in the browser to enter a need to log in to the URL, the system will first automatically from the

Hosts file to find the corresponding IP address, once found, the system will immediately open the corresponding Web page, if not found, then the system will be the site

Submit DNS domain name resolution server for IP address resolution. If we make a domain change to it, then the computer takes precedence over the local

Server, read the domain name, so as long as we have a certain processing, we can achieve the purpose of shielding harmful web sites, thereby effectively reducing

Fewer computers are threatened by fishing, Trojan attacks (and, of course, the effectiveness of fast access)

Hosts file location: In the C:windowssystem32driversetc folder to find the Hosts file, with Notepad open, the first more http://hi.baidu.com/%C9%F2%D1%F4%CB%B6%CA%F3

If you do not change the UAC settings for Windows, you may encounter situations where you cannot save properly, and there are two ways to resolve

Solution One: Use WordPad to open and save, with my practice, the use of WordPad can be without the user account to enable the case, the hosts file to modify and save.

Solution Two: Click Start Menu-All Programs-Accessories, find Notepad options, right-click to run as an administrator, and then the hosts file to modify.

Hosts is a system file without extensions, you can use Notepad and other tools to open, its role is to use a number of commonly used Web site domain name and its corresponding IP address to establish an association "database", when the user in the browser to enter a need to log in to the URL, The system will first automatically find the corresponding IP address from the Hosts file, once found, the system will immediately open the corresponding Web page, if not found, then the system will be submitted to DNS domain name resolution server IP address resolution.

1, speed up the domain name resolution

For Web sites that you want to visit frequently, we can improve the speed of domain resolution by configuring domain name and IP mapping relationships in hosts. Because of the mapping relationship, when we enter the domain name computer can quickly resolve the IP, rather than requesting a DNS server on the network.

2, Convenient LAN users

In many units of the local area network, there will be a server for users to use. However, because the local area network generally rarely set up DNS servers, access to these servers, to enter the difficult to remember the IP address. This is quite troublesome for many people. Now you can give these servers an easy to remember name, and then set up IP mapping in the hosts, so that when the next visit, as long as the name of the server to enter the line.

3, shielding the site

Now a lot of web sites without user consent to install a variety of plug-ins to your computer, some of which may be Trojans or viruses. For these sites we can use the hosts to map the site's domain name to the wrong IP or the local computer's IP, so no access. In the WINDOWSX system, the Convention 127.0.0.1 as the IP address of the local computer, and 0.0.0.0 is the wrong IP address.

If, in hosts, we write the following:

127.0.0.1 # to screen site A

0.0.0.0 # to screen the site B

In this way, when the computer resolves domain A and b, it resolves to the native IP or the wrong IP, and achieves the purpose of shielding the Web site A and B.

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.

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.