ComputersFile Types

Hosts - what should be there? Hosts File

Operating system (OS) Windows (as well as other OS) has the ability to speed up the transition to the IP address you typed in the address bar of the site without contacting the Domain Name System DNS - DomainNameSystem. To do this, use a special operating system file called hosts (used without any extension). The question arises: "File hosts - what there should be?"

What is needed and what does the hosts file contain?

If this file specifies the correspondence of the site name to its actual IP address, then the redirection occurs without contacting your provider's DNS service. Hosts file is a plain text file that can be opened by any text editor, for example "Notepad" (but requires administrator rights). By default, the file contains several lines of explanations (comments) in English or Russian and a single executable line that provides redirection to the IP address of the computer itself of calls to the localhost name.

Where the hosts file is located

Usually the hosts file can be found:

  • In Windows 95/98 / ME versions - in the WINDOWS directory;
  • In Windows versions of NT / 2000 - at the address WINNT \ system32 \ drivers \ etc;
  • File hosts Windows 7 (and versions of Windows XP / 2003 / Vista / 8) - in the directory WINDOWS \ system32 \ drivers \ etc.

Other operating systems also have a hosts file with similar functions. Where the hosts file in these OS is located, it is necessary to consider separately.

Why the virus protection file is important

The importance of resolving the issue of hosts, which should be there, is that some malicious programs use special properties of this file to protect against anti-virus programs and to block the call of certain files. After all, if you record the redirection of anti-virus programs to a false IP address in the hosts file, then the computer will not have the ability to run these programs, and, for example, the anti-virus databases will simply not be updated.

Therefore, if your computer has problems with the operation of anti-virus software, one of the reasons may be unauthorized modification of the hosts file on your computer.

What can the hosts file be used for?

Its some users use to prevent the possibility of using certain sites, for example pornographic or boring social networking sites. To implement such a task, you can simply enter at the end of the file for each site one line of type: 127.0.0.1 "site name". In this case, the sites, which users are trying to transfer on this computer, simply will not be called.
You can also do this trick: redirect those trying to invoke an unwanted site on a site , for example, Mashkov's library, by entering the line: 81.176.66.163 "site name".

Exclude ad serving

Also, the question of hosts, what should be there, is important because by adding some additions to it, you can avoid showing boring contextual and / or banner ads that are added in some sites not only along the perimeter of the information content of the pages, but also interspersed in the middle of the texts Articles. To do this, you need to redirect the sites hosting these types of advertisements to address 127.0.0.1, as indicated above. And these are sites such as, for example, "Google" contextual advertising AdSense. To exclude its display, enter the following lines in the hosts file:

  • 127.0.0.1 pagead.googlesyndication.com;
  • 127.0.0.1 pagead2.googlesyndication.com.

And save the file. If you want to view this ad again, you should delete these lines or make them comments by putting the # (grid) character with a space at the beginning of the line.

On the Internet, you can find ready-made texts for inserting into the hosts file containing many such lines that exclude the display of unnecessary advertising materials. In addition, there are ready-made texts for setting up faster work with some search engines, for example, hosts google. However, you should use these materials carefully. It is not advisable that the size of hosts file exceeds 10 KB. Otherwise, he himself will slow down the system. Although in these 10 Kbytes you can accommodate a lot of such redirect lines.

Possible difficulties

First, you need to make sure that the file you want to edit. The fact is that some cunning virus program creators mask the hosts file used by the system, placing it not in the place where it is registered by default. The system accesses the hosts file Windows 7, whose path is registered in the registry in the DataBasePath parameter located at: HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ services \ Tcpip \ Parameters \.

The correct path value looks like this:% SystemRoot% \ system32 \ drivers \ etc \ hosts. You can check this by calling the regedit.exe registry editor from the Start menu - execute.

If the specified variable contains a different value, you need to restore the value that should be.

Another ploy of malicious programs is the placement in the directory etc along with the hosts file of another file with a similar name, for example, host. Be careful, make sure that you are checking and editing the file that is being used by the system.

The third trick is to hide the file for viewing. Just in the properties of the file it is prescribed that it is hidden. In this case, it simply can not be seen in the catalog, although it is there. To view it, you must first set the item "Show hidden files". In Windows XP, this option is set in the "View" tab of the "Properties" panel of the "Control Panel" menu. After that, viewing hidden files will be possible, and you can clear the hidden attribute in the properties of this file. At the same time, make sure that the "Read only" flag is set for this file. If set, you can not edit it. You need to uncheck the corresponding field in the file properties panel.

The next trick may be to use a proxy. If manual proxy configuration is set, the hosts file does not work. To fix this, check your browser settings. For example, for Firefox, you need to open "Settings", then "More", then select "Configure" in the "Network" tab. In the menu that appears, if the item "Use system proxy settings" was selected, select "No proxy" and save the settings. But if the item "Manually setting up the proxy service" was selected, and you did not install it, then you need to do more work. First you need to remember the installed proxy server address, set the "No proxy" option, save the settings. Then you need to open the Registry Editor, call up the search, insert the stored address and perform a search by deleting the value of your address assigned to them in the found keys.

Simple protection

By the way, in order to prevent malicious programs from changing the settings of the hosts file of your computer, it is useful in its properties to set (after all your changes in it) the attribute "Read only".

Thus, in this article we have dealt with the issue of Hosts, what should be there, and found out what kind of file it is, where it is located, what functions it performs, how it can harm a computer under the influence of malicious programs, and how to use it in its Purposes.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.birmiss.com. Theme powered by WordPress.