How to set up smartphones and PCs. Informational portal

Original hosts file for windows 7. HOSTS file

You don't need to download a clean Hosts file for Windows 10. You can manually clean up the file from all changes. It is a system file that very often suffers from virus attacks. Attackers enter their parameters in Hosts. After that, strange things start to happen on the computer. For example, you cannot go to the site you need, or your transition to unknown pages is automatically triggered. If your computer has undergone a virus attack, then after identifying holes in the security system, take care to return Hosts to its original form.

How to return the Hosts file to its original state

Hosts is the system file on the basis of which the system works. Changes in this file have an impact on various areas, primarily on the use of the Internet. Sometimes the system administrators, or even the users themselves, make changes to the Hosts file. In this case, there is nothing wrong. But if you did not make any changes and do not know who did it, then you need to return the Hosts file to its original state. To do this, you have 2 methods, you can choose any:
  • Download a clean Hosts file and replace the problematic one;
  • Delete all contents of the Hosts file;
The first way is to download a clean Hosts file, the good thing is that it allows you to guaranteed to fix the problem and not damage the system. You can download the clean and original Host from this page. If you have any doubts about its purity, then you can check its contents against the contents of the Hosts reference file. To do this, open our file through Notepad or another editor. After that, you will find out what should be in the original Hosts.


If you do not want to download anything, then you have another solution to the problem. You must open the Hosts file located on your hard drive. Then you have to delete all of its contents and save the file. After that, you must reboot the system. Windows 10 will add the necessary content to Hosts itself. And you will not break the system in any way. And if you still choose the first option - download Hosts, then be sure to make sure that this file is from your OS. Files from Windows 7/8 or earlier are not suitable for Windows 10.

I am writing about what worries at the moment. On my computer, the sites Odnoklassniki, VKontakte, and My World were simultaneously blocked.

Of course, you can bypass the blocking using an anonymizer if this happens at work or school, but if this is your computer, then you should know that you have "caught a virus". Of course, it is very unpleasant to realize that a "stranger" is in charge of your territory, but do not despair, everything is in our hands!

To remove the virus, you need to find the hosts file on the computer at these addresses: Press the button Start - Computer - Local Disk (C :) and further -

Windows95 / 98 / ME: WINDOWS \ hostsWindowsNT / 2000:

WINNT \ system32 \ drivers \ etc \ hostsWindowsXP / 2003 / Vista:

WINDOWS \ system32 \ drivers \ etc \ hosts

Attention!

Before opening the file, at the top, click Tools - Folder Options - View - Additional Options... Scroll through the window and at the very bottom we find the option Show hidden folders, files, drives.

This is very important, since the viral hosts file enters our computer in a hidden form.

I found two "extra" hosts files. These hidden "virus" files need to be removed. Open the file using the Notepad editor (right-click - "open with").

If you do not have this editor, then open it with Notepad or WpordPad.

A "clean" hosts file should look like this:

For Windows XP

# Copyright (c) 1993-1999 Microsoft Corp.

# This is a sample HOSTS file used by Microsoft TCP / IP for Windows.

# This file contains the mappings of IP addresses to host names. Each

# entry should be kept on an individual line. The IP address should

# be placed in the first column followed by the corresponding host name.

# The IP address and the host name should be separated by at least one

# Additionally, comments (such as these) may be inserted on individual

# lines or following the machine name denoted by a ‘#’ symbol.

# 102.54.94.97 rhino.acme.com # source server

# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost

For Windows Vista


#

#




# space.
#


#
# For example:
#


127.0.0.1 localhost :: 1 localhost

For Windows 7 system

# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP / IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handle within DNS itself.
# 127.0.0.1 localhost
# :: 1 localhost

In Russian:

# (C) Microsoft Corp. 1993-1999

# This is a sample HOSTS file used by Microsoft TCP / IP for Windows.

# This file contains mappings of IP addresses to host names.

# Each element must be on a separate line. The IP address must

# is in the first column, followed by the corresponding name.

# IP address and hostname must be separated by at least one space.

# In addition, comments may be inserted on some lines

# (such as this line), they must follow the hostname and be separated

# from it with the symbol '#'.

# For example:

# 102.54.94.97 rhino.acme.com # source server

# 38.25.63.10 x.acme.com # client x host

127.0.0.1 localhost

When you have compared the "clean version" with your own and found unnecessary records - get them away - it's rubbish! Also, remove unnecessary hidden hosts files, in which you will find links to Odnoklassniki, My World, VKontakte and many other nasty things. You yourself will understand everything.

This is how the infected hosts file looks like:

If you are afraid to make any changes, then simply restore the hosts file. To do this, create an empty hosts.txt file on the C drive (it was selected to make it easier to perform subsequent actions), open it in notepad and enter the file template corresponding to your operating system (see above).

After that, copy the created file to the C: \ Windows \ System32 \ Drivers \ etc directory or to C: \ Windows \ SysWOW64 \ drivers \ etc for 64-bit Windows 7.

If there are no hidden files and your only file is written in addition to the above, delete everything in it and insert one of the above texts.

Attention!

The hosts file is saved without an extension (it should not be in the hosts.txt format). After all that has been done, be sure to restart your computer.

For everyone who has problems with this file !!! The file was checked by antiviruses Kaspersky, Node 32, Doctor Web - everything is clean! Download the file, unzip it, copy it to the Windows / system32 / drivers / etc directory (if Windows asks for permission to substitute files, we agree, if it writes an error that you are not an Administrator, try replacing the file using the Total Commander program) and enjoy life. The file fits all the latest operating systems:
  • Windows XP
  • Windows Vista
  • Windows 7
  • Windows 8 and 8.1
The file is required mainly for those who do not open any sites in contacts, as well as for those who cannot access anti-virus sites or update antiviruses. Description of the file. Downloading is completely free, without annoying SMS. An article on how to create a hosts file yourself, the article can help you solve your problem.
Also, one of the users provided us with their host file so that you can use it.It blocks all malicious and advertising sites that can harm your computer. We express our gratitude to the user Diman8369 for providing such a file.

Create and Modify a Host File in Windows XP

Windows 7, 8, 8.1 and 10


About 8 thousand computers a day are infected with Trojan Hosts

Doctor Web has reported an increasing number of hacked sites in order to download malware of the Trojan.Hosts family to users' computers. The scale of the spread of this threat at the beginning of 2013 became almost epidemic. Trojan.Hosts Trojans spread peaked in January and mid-February, when about 9,500 infections were recorded on users' computers every day. In March, Trojan.Hosts infect about 8,000 computers a day.


To hack sites, cybercriminals use the FTP protocol, connecting to resources using previously stolen logins and passwords. Then a special command interpreter (shell) is loaded onto the compromised site, using which the .htacess file is modified, and a malicious script is placed on the site.

As a result, when entering an infected site, the script displays the visitor a web page containing links to various malicious applications. In particular, Trojans of the Trojan.Hosts family have recently begun to spread widely in this way.

The main purpose of malicious programs of the Trojan.Hosts family is to modify the hosts file located in the Windows system folder and responsible for translating network addresses of sites. As a result of malicious actions, when trying to go to one of the popular Internet resources, the user of the infected computer is redirected to a web page belonging to the cybercriminals.

Few users working with the "seven" and surfing the Internet guess the true meaning of the HOSTS file (Windows 7). Its content will be shown a little later, but for now let's dwell a little on theory.

why is it needed?

In general, if anyone paid attention, the file itself is located in the etc directory, if you successively go through the tree from the Windows folder, through System32 to the drivers directory on the system disk. Not everyone, however, enters such a jungle of the system; by and large, this is not necessary. On the other hand, if you pay attention, the object itself does not have an extension, although, in fact, it is an ordinary text document.

But let's take a closer look at Windows 7. Its content is that it is this object in the system that is responsible for the relationship between the names of hosts (sites, nodes, etc.) and determining their IP addresses to provide the end user with access to the resource. Roughly speaking, we do not need to write combinations consisting of numbers in the browser, but only the names of resources can be specified.

And one more small clarification about the HOSTS file (Windows 7). Its content is subject to change. Depending on what kind of changes were made, this can help block certain sites, speed up access to some resources, or, on the contrary, play a cruel joke by redirecting the user to questionable sites. However, let's first take a look at the original file.

(Windows 7): table of contents

So, first let's try to open it. I must say that if you use the standard double-click method, nothing will work, because, as mentioned above, this object has no extension. In addition, the file can be hidden, so you must first select the display of hidden objects in the view menu. But the system will offer several applications to open. We choose the simplest - the standard "Notepad" and look at the contents of the HOSTS file (Windows 7). Before us is something incomprehensible: descriptive text, some examples and a line indicating the local IP (# 127.0.0.1 localhost). It should be so.

Attention! There should be nothing at all below the line indicating the reserved local address, unless, of course, the user wants some resource to be blocked!

In general, everything above localhost refers to the allowed resources. Everything below - to the blocked ones. It is not hard to guess that many viruses, in particular programs that spread spam or advertisements (Malware, Adware, etc.), independently edit the contents of this file. So it turns out that when requesting one resource, the user receives a redirect (redirect) to a completely different one.

HOSTS by default in Windows 7

We have reviewed the original file. Now let's take a look at the changed content. To fix it, you can take the contents of the "clean" file for the "seven" from another computer or from the Internet, copy it, then paste it into the original and save it.

But there is one problem here. The fact is that sometimes, after deleting everything unnecessary, it is impossible to save the file as the original (the system simply does not allow it to be done).

How to proceed in this case? First, delete the original completely (Shift + Del), bypassing the "Trash". Then we use the right click on the empty space inside the etc directory and create a new file with the same name, but do not specify the extension. Now we insert the necessary content into it and save the object. After that, in the same place you need to find the lmhosts.sam file and delete it, as indicated earlier.

That's it, it's done. That in the first, that in the second case, a system reboot is mandatory. Only then will everything work as expected. And, of course, editing should be done exclusively with administrator rights.

Outcome

All in all, here's a very brief introduction to the HOST file. If you look at the issues of blocking some unwanted resources or, on the contrary, permission to visit them with accelerated access, editing should be done exclusively manually and according to certain rules. Here you need to remember that the key role of the separator is played by the string indicating the reserved local IP. Well, then, as they say, it's a matter of technology. By the way, the above technique will also help if the content of the object has been changed due to the influence of virus programs.

In simple terms, the file Hosts is a text file no extension which contains a database of domain names and converts them to ip address. When you enter the name of the site into the browser - the computer converts the name of the site (letters) into numbers (IP address of the site)

Why hosts are needed

Also block access to sites through hosts malware can also. In addition, by changing the hosts file, making an appropriate entry in it, they can redirect to another site- a twin site, outwardly similar to a popular resource, where an inattentive user entering a login and password will lose his credentials from this site, because they will get to the intruders.

How to fix HOSTS

If you have problems with visiting Internet pages, you cannot enter the site or you are redirected to another site, etc., check the hosts file and correct it if necessary.

To fix hosts need to know where is the hosts file... The HOSTS file in Windows XP, 2003, Vista and 7 is by default located in the etc folder on the operating system disk partition - usually the C partition, the full path

C: \ WINDOWS \ system32 \ drivers \ etc

If your system is on another section, then look for hosts file follows there, for example on D

D: \ WINDOWS \ system32 \ drivers \ etc

In other Windows OS find host can be at the address

WINNT \ system32 \ drivers \ etc - for NT and 2000

WINDOWS \ hosts - for 95, 98 and ME

Because HOSTS text file, then it is torn off using any or usual Notepad built into the system

In different operating systems hosts the file looks different, there are slight differences

hosts for Windows XP and Windows Server 2003

# (C) Microsoft Corp. 1993-1999 # # This is a sample HOSTS file used by Microsoft TCP / IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a "#" symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost

hosts for Windows Vista and Windows Server 2008

# (C) Microsoft Corp. 1993-2006 # # This is a sample HOSTS file used by Microsoft TCP / IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a "#" symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost :: 1 localhost

hosts for Windows 7

# Copyright (c) 1993-2006 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP / IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a "#" symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host

# localhost name resolution is handle within DNS itself. # 127.0.0.1 localhost # :: 1 localhost

Copy the code necessary for your system and paste it instead of the old one. The myth that in order to save changes in the HOSTS file - you first need to rename it is incorrect. I calmly edit the hosts file and all changes are saved.

Top related articles