The Hosts file inside windows

Source: Internet
Author: User
Tags file copy ad server

First, what is the Hosts file?

The Hosts file is a computer file that is used to store information about each node in a computer network. This file is responsible for mapping the host name to the appropriate IP address. The Hosts file is typically used to supplement or replace the functionality of DNS in the network. Unlike DNS, users of the computer can control the hosts file directly.

1. The history of the Hosts file

ARPANET (the predecessor of the Internet) does not use DNS for the addresses of the nodes in the network. Since there was no centralized system for this purpose at the time, each network node used its own network node map and assigned the corresponding name to facilitate the user's memory. There was no system to ensure that all systems in the network were represented by the same name, and there was no way to read the hosts files of other users and copy them automatically.

The ARPANET is small in size, allowing the hosts file to be used to name some of the pre-agreed names in specific situations. A typical network node has an address and may have multiple names. However, when the personal network is huge, it is more difficult to manage the hosts file.

2. Location of the Hosts file

The Hosts file differs in the location of different operating systems (or even different versions of Windows): (Windows7: C:\WINDOWS\SYSTEM32\DRIVERS\ETC)

In Windows, the default Hosts file is usually blank or contains a comment statement and uses a default rule:

127.0.0.1 localhost

:: 1 localhost

3. The purpose of the Hosts file

The Hosts file can also be used for other situations, such as the ability to redirect a known ad server to an ad-free machine (usually the local IP address: 127.0.0.1) to filter ads. You can also reduce bandwidth by not downloading Web ads. Using the Hosts file can also reduce access to the DNS server to speed up access and reduce bandwidth consumption.

Another important use of the Hosts file is to intercept requests for malicious websites, preventing access to fraudulent websites or infecting some viruses or malicious software. At the same time, the file may be exploited by viruses or malware to prevent users from updating their antivirus software or visiting specific websites.

You can also access sites that are inaccessible for some reason by modifying the Hosts file to force the site to be assigned to the correct IP. In addition, some software cracking activation is often used in the Hosts file, the principle is that the blocking software automatically connect the official server to verify that the activation information is correct.

Second, modify the Windows 7 Hosts file method

Method One, improve the user's permissions to the Hosts file operation

1, under normal circumstances, if you modify the Hosts file directly, even if you are operating as an administrator, you will be prompted to do not have permission to operate, such as:

2, at this time we can improve the user to the hosts file operation rights to solve, the specific method is as follows: Right click on the Hosts file, select Properties, and then click on the "Security" tab, select the user account now logged in and click "Edit", in the pop-up Permissions settings screen again check the current user, Then tick "Full Control" or "Modify", then click Apply to take effect.

3. After the setup is complete, the Hosts file can be changed!

Method Two, copy replace Hosts file

First copy the Hosts file to another location, and then in the copy of the hosts file do you want to change, the operation is completed after the Hosts file copy moved to the original Hosts file directory, this will prompt whether to overwrite, click OK overwrite can!

Method Three, enter a lower operating environment operation

As with other operational permissions issues, entering a lower operating environment can also be a good solution to this problem, such as entering Windows 7 security mode or entering the PE system, etc., into the Windows 7 Safe Mode method as follows: When you start the computer, quickly press the F8 key on the keyboard, and then in the Windows 7 Advanced boot options to enter "Safe Mode" (use the arrow keys on the keyboard to select, enter enter key to determine), you can change to save the Hosts file!

Here is the hosts file for your company's computer:

The Hosts file in My computer adds this code and the computer can access the IP address.

The Hosts file inside windows

Related Article

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.