Home  >  Article  >  What does the hosts file do?

What does the hosts file do?

青灯夜游
青灯夜游Original
2021-02-23 14:52:1651850browse

The hosts file is a computer file used to store information about each node in a computer network; its function is to establish an associated "database" between some commonly used URL domain names and their corresponding IP addresses. When the user enters the When a URL needs to be logged in, the system will first automatically search for the corresponding IP address from the Hosts file.

What does the hosts file do?

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

What is the hosts file:

1. The hosts file is a computer file used to store information about each node in the computer network.

2. This file is responsible for mapping the host name to the corresponding IP address.

3. The hosts file is usually used to supplement or replace the function of DNS in the network.

4. Unlike DNS, computer users can directly control the hosts file.

5. Location of hosts file: C:\Windows\System32\drivers\etc

What does the hosts file do?

##Function of hosts file:

1. The hosts file can also be used in other situations. For example, a known advertising server can be redirected to an ad-free machine (usually the local IP address: 127.0.0.1) to filter advertisements.

At the same time, you can also reduce bandwidth by not downloading online advertisements.

Using the hosts file can also reduce access to the DNS server to speed up access and reduce bandwidth consumption.

2. Another important use of the hosts file is to intercept requests from some malicious websites, thereby preventing access to fraudulent websites or infection with some viruses or malware.

But at the same time, this file may also be used by viruses or malware to prevent users from updating anti-virus software or accessing specific websites.

3. In addition, you can also modify the hosts file to force the website to be assigned to the correct IP, so as to access sites that cannot be accessed for some reasons.

In addition, hosts files are often used in some software. The principle is to block the software from automatically connecting to the official server to verify information.

The function of hosts is to establish an associated "database" between some commonly used URL domain names and their corresponding IP addresses. When the user enters a URL that needs to be logged in in the browser, the system will first automatically search for it from the Hosts file. The corresponding IP address will be helpful for everyone to operate the computer!

For more programming related knowledge, please visit:

Programming Video! !

The above is the detailed content of What does the hosts file do?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is the hostnameNext article:What is the hostname