Where is the hosts file?

Watch the video

Where is the hosts file?

When you have problems associated with infecting your computer with viruses, you are probably advised to work with the host file everywhere. But what is it, is it really created just for this, and where is the hosts file?

What is the hosts file?

Many would like to know what the host file is for. We will try to convey information to you in an accessible language.

So, the hosts file first determines the compliance of certain domain names with IP addresses. It can be used to increase the speed of work on the Internet, that is, hosts bypassing access to the DNS server for fairly frequently visited pages, blocking access to certain unwanted sites and banning access to addresses of banner exchange networks.

Where is the hosts file, we will tell later, but for now let's see what the hosts file looks like. By default, it contains only one line: 127.0.0.1 localhost. It also contains a small help from Microsof, in which there are rules for adding new entries.

How the hosts file works

So, during normal operation, you type the site address in the browser, then it contacts the DNS server.The latter translates this website address into the IP address of the requested server. Below is the status bar of the browser, at that time it says "Search for a site ...". When a node is found, the inscription appears in the browser's status bar: "Node found, waiting for response ...". At this point, a TCP connection is established.

But work on the Internet can be accelerated. The hosts file matches domain names with frequently visited sites (with their IP addresses). That is, the need to access the DNS server disappears, the connection is established immediately. The node's IP is easily recognized through the ping program, which is located in the following path: drive C, WINDOWS, system32, and there is already ping.exe. We need to type in cmd.exe on the command line and click OK. A window will appear in which you will need to type ping www.yandex.ru for example. That's how you get the IP address of Yandex.

Where is the hosts file

For the Windows XP or Vista operating system, the hosts file is located here:

  1. local disk C
  2. WINDOWS
  3. system32 folder
  4. folder drivers
  5. etc
  6. hosts file

In Windows 7, we find the notepad program, which is located in the root of the C: \ windows \ folder. Right-click on the file, call the context menu. Run the file from the administrator, in notepad through the menu "open file" go on the way C, windows, system32, drivers. The folder etc. appears.In this folder, manually type "hosts" in the "File" line.