Hosts windows 7 content. The hosts file - where it is located, how it should look, how to edit and save. How to open and edit it

Hosts file  responsible for matching the names of sites with their IP addresses. With it, they often solve some specific tasks, for example, deny access to certain sites or give names to virtual sites when developing them on personal computer. However, sometimes there are problems with the hosts file. Let's deal with them.

Where is the hosts file in Windows 7?

By default, the hosts file is located in the system folder. % systemroot% \\ system32 \\ drivers \\ etc \\that matches on most computers C: \\ windows \\ system32 \\ drivers \\ etc \\.

Step 1: Right Click. Step 2: Click on the search icon. Step 3: Search for notepad or notepad. When the result appears, right-click the name of the Notepad program and select the option “Run as administrator”. Step 4: Click “Yes” if asked if you want to launch Notepad as an administrator.

Step 8: Save the file and close Notepad. On your site you can already access from your local computer using the domain. Type Notepad in the search field. Right-click Notepad and select Run as Administrator. Step 2: Make sure you want to run Notepad as an administrator.

However, it is hidden from prying eyes and if you do not enable the "display of hidden and system files" folder settings, then you may not find it there.

How to change the contents of the hosts file in Windows 7?

For editing host files You must have administrator rights. Otherwise, you can only view its contents.

Step 5: Save the file and close Notepad. Thus, you can block websites by calling, for example, an address to enter another page. Here is a graph with its location on the most common systems. For this reason, you seem to be specifying a folder, but this is actually just a file without an extension.

Enter a path notepad where the path is one of the above locations depending on your system. You can use lines starting with # to make comments, for example. After the comments, you have something like. They must be separated by at least one space.

To modify the file, click RMB on any text editor, such as Notepad, and click "Run as administrator", after which you can open the hosts file, edit it and save it. All changes will immediately begin to work.

Why does the hosts file not work in Windows 7?

Sometimes the hosts file stops working. He is. There is in its proper place. There are no errors in it. But the hosts file does not work. Often, I noticed this behavior on computers with installed antivirus from Kaspersky Lab, as well as when using web server assemblies for site developers, for example Denwer.

So place the cursor at the end of the line and enter the input to go to next line. The difference is that blocking can take a little longer when using 1, and if a web server is installed on the computer, all blocked sites will be redirected to it.

Just download them and save according to your system. Right-click it and select Properties. Click Stop, and then change the startup type to Off. You probably have a trojan in your system. Update your antivirus and run a scan.

And always the problem was in the rights to the file. The easiest way to solve this problem is as follows. Copy the contents of the hosts file to any document, delete the hosts file and restart the computer. Instead of the old one, the system will automatically create a default file with the necessary rights, and by editing it you can already work with it.

What needs to be changed and how should it be?

The owner of this server can steal data sent by infected users of the bank who believe that they are on a real site. Any entry that mentions banking sites can be deleted without problems. Some bank protection programs create entries on the hosts so that the bank’s website cannot be redirected, but even if you delete it, this should not cause problems.

It can be used to control traffic on the Internet or to block a website. Easy to reset hosts! You will be asked to check the file name extension. Copy the following text and paste it into the file. Just run the files you trust, executable files can potentially change your computer’s settings or damage it. However, malware writers such as viruses, trojans and worms give the same file name to their processes to try to avoid detection.

There are no related topics. not yet

What is the Hosts file for?
The purpose of this system file  - Assigning certain IP addresses to specific website addresses.
This file is very fond of all sorts of viruses and malware in order to register your data in it or simply replace it.
The result of these actions may be signs of the "insertion" of the site into browsers, which will ask to send SMS when opening the browser or blocking various sites, at the discretion of the creators of the virus.

How to identify suspicious options? We recommend that you check the security of your computer. Since each machine can have several network adapters  and several interfaces for each adapter, one computer can have several names in the domain name system.

This is a convenient way to get information from the kernel and transfer it to the kernel. Thus, the core can share several bits of information: the status of each device, whether it is a removable device, etc. Surprisingly, the domain name is not managed in the same way, but comes from the fully qualified name of the machine, obtained by resolving the names.

Where is the hosts file in windows?
For different versions of Windows, the location of the hosts file is slightly different:

Windows 95/98 / ME: WINDOWS \\ hosts
Windows NT / 2000: WINNT \\ system32 \\ drivers \\ etc \\ hosts
Windows XP / 2003 / Vista / Seven (7) / 8: WINDOWS \\ system32 \\ drivers \\ etc \\ hosts


Moreover, the ending hosts, this is the destination file, not the folder. He doesn’t.

What should the correct hosts file look like?
The "content" of the hosts file is also slightly different for different windows versionsbut not really. It is "written" in English for what it is needed and how to make exceptions with one example. All lines starting with a # sign mean that they are commented out and do not affect the file.
The contents of the original hosts file for Windows XP:

An entry that includes host name resolution is the hosts. The slightest change in compliance will require updating the file everywhere. Another possible use is to redirect traffic made from a specific machine to a local host, which avoids communication with this computer. For example, hostnames of servers designed to provide advertising can be distracted, which will prevent such advertising from making navigation more fluid and less dispersed.

Increase website loading speed

Then, the verification mechanism is turned on and the message “Connection is unsafe” is displayed. You can disable the entry by adding # to the beginning of the line. However, you can change that. Nor should we expect dramatic improvement. If you are wondering if these protections are effective, the answer is yes and no.


#

#




# space.
#


#
# For example:
#



127.0.0.1 localhost


The contents of the original hosts file for Windows Vista:

# 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
127.0.0.1 localhost :: 1 localhost

How to open Hosts

Thus, you can launch Notepad with the right mouse button, and then run as administrator. Next video  summarizes the entire operation. Copy it, replacing the existing one. We suggest you find an alternative method that is very efficient and uses almost no resources on the machine. Unlike extensions, this method allows you to avoid downloading inappropriate content and is not based on content analysis, but on blocking the domains serving these plotters and others.

Technique 22 years!

The technique that we are going to use is based on a file, a mechanism that allowed us to abandon domain name servers at the beginning of the Internet. This is the address that is used to connect your computer to a web server that provides you with the content displayed in your browser. To avoid downloading, we will assemble your browser.


The contents of the original hosts file for Windows 7:

# Copyright (c) 1993-2009 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

Lists are updated regularly

Since the browser cannot find anything to display from your hard drive, it will not download or display inappropriate content. It's that simple: a referral’s voluntary mistake. You will need to redirect a large number of  domains to the address. As you do not know, a priori, addresses for adding, we offer below ready-made and updated lists.

There are, of course, other lists and tools. And do not forget to create a copy of your host file before making any changes. You can easily return to the initial state. “Change” is not recognized as an internal or external command, operational program  or batch file.


The contents of the original hosts file for Windows 8:

# Copyright (c) 1993-2009 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

Once you place the file, right-click on it and open it with notepad. Therefore, save the modified file in another place, make sure that you save it as “hosts” and select the file type as “All files”, as shown below.

Scan a hard disk: let the software quickly scan it, after completing a quick scan, deep scan  will be automatically launched to find other files, but you can freely cancel this deep scan if you have already found the files you want to recover after a quick analysis.

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


As you can see, there are no special differences in the contents of the host file for different versions of windows.

How to open and modify the hosts file?
The hosts file can be standard Windows Notepad.
Here, probably, the most interesting part of the article.
First of all, you need to understand, but why change this file at all? Yes, in order to restrict access to certain sites. Thus changing given file  and having registered the website address in it, the user will not be able to access it through any.
In order to modify the hosts file, it is advisable to open it as administrator () by right-clicking on the file and selecting "Run as administrator". Or open Notepad in this way and open the file in it.

View the file and restore it: after scanning, all found data will be displayed in the interface. You can view the files you are looking for before trying to recover them. Feel free to start recovery as quickly as possible. Resetting your hosts file is easy!

You will be asked to check the file extension name. The requirement of two different system directories has been resolved. This is most likely due to permission problems; There is an explanation of how to get around this below.

  • Open Notepad or another text editor, such as Notepad.
  • Tip 1 for quick access  to this folder.
You will be asked to check the resolution, and you will have to confirm the overwrite of the file.

For quick action, you can simply click the Start button and select Run ( win+r) () and enter in the line:

notepad% windir% \\ system32 \\ drivers \\ etc \\ hosts




As a result, this file will open in Notepad.

In order to block access to the site  (suppose it will be test.ru), you just need to add a line with this site to the very bottom:

What is the hosts file used for?

Another option is to open your text editor program as an administrator so that the permissions are already applied to the editor. By modifying it, malware can block access to antivirus updates or force you to a malicious website.

An easier way to block specific domains from your computer is to use support that supports content filtering or blacklists. Why would you do this? Launch the Notepad application and open the "hosts"? file located on your desktop.

  • Open Notepad with administrator privileges.
  • Copy "hosts"? file to the desktop.
  • Add a record of your hosts and save the file.
  • Just add new mappings under the defaults.
  • Or edit one of the defaults if you know what you are doing!
  • You can navigate through the file using the arrow keys.
The need for access to several different operating systems in the absence of computers can be solved by installing them on one computer.

127.0.0.1 test.ru


As a result, the file will have this content:

# 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
# 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

Just share hDD  correctly and install separate operating systems on the purchased partitions. Then just configure the bootloader correctly and choose the most appropriate operating system when you boot the computer. Here virtualization can help. Several virtual machines can run on the same physical machine. Jim's assigned hardware resources are usually also virtual. For example, each operating systeminstalled on virtual machines, a virtual virtual network card can be assigned.

# This HOSTS file created by Dr.Web Anti-rootkit API

# 127.0.0.1 localhost
# :: 1 localhost
127.0.0.1 test.ru


Each new site that you want to block, you need to start from a new line and register, not forgetting the local IP address 127.0.0.1

Also, to edit the hosts file, there is a program HOSTS EDITOR, which you can download and read the description from.
The principle of her work is that she helps to edit the hosts file.
From the screenshot below, the principle of its work is clear, everything is done in a couple of clicks. Adding is done by clicking on +.

Then virtual PCs can be connected by a virtual computer network. Disks assigned to virtual machines can be - and usually - are just files located on the hard drive of the host computer. As is the case with free software, many developers from around the world participate and develop. The disadvantage of this solution is the potential stability and security problems of the host system.

First you need to leave. Till latest version  carries the number and then launches it and allows her to lead. Something you don’t like, don’t like, do you like new or improved features? The following is a list of components to install. For the first time, you can recommend installing everything.



After editing, do not forget to click on the save button (2 "Save changes" button to the left of the "+" button).

You can also change this file for good purposes, for example speed up site loading.
How it works?
When you enter the site, you see its domain name, which has letters. But all sites on the Internet have an IP address, and names are already assigned using DNS. I will not go into the details of this process, the article is not about that. But here you need to know that the hosts file takes precedence when accessing sites, and only after it is a request for DNS.
In order to speed up the loading of a site, you need to know its IP address and domain.
The IP address of the site can be found using various services, for example, or.
Domain is the name of the site.
For example, we’ll speed up the loading of this site where you read the article by explicitly specifying the IP address and domain to the file.
Then the line to be added will be:

What if the hosts file is not?

You must download and install it manually. The last step is to click the Finish button. Unlike installation, just clicking the mouse is not enough. The root password for official images is usually the root. You can connect to the console again at any time.

Of course, do not press this key combination, but send it from the "Monitor" menu. Setting the swap area. We also briefly mentioned the transmission problem in terms of the fonts used in the transferred files. The subject described above, which is only a brief description. We can say that vector drawing programs in this case have some superiority over others working with fonts. All widely used vector programs allow you to break fragments into curves, which is not common in betting and flipping programs.

91.218.228.14 website


This speeds up the page loading in a couple of seconds, and sometimes it can give access if you can’t access the site using standard tools.

You can still redirect to another site using hosts file.
To do this, you need to know the IP address of the site and its domain (as in the above case), then the added line will be like this:

91.218.228.14 test.ru


And now, after entering in address bar  browser site test.ru, you will be redirected to the site specified in the IP address ..

If you want to clean hosts file, then you can do this by simply deleting the contents and inserting the original text into it from the description above (under the spoilers).

Some nuances in the hosts file:

  • Always check if you have a scroll bar on the side and always scroll the window to the bottom. this is due to the fact that some viruses are registered in the area hidden outside the window.
  • In some cases, usually if you cannot save the file, you need to log in account  Administrator
  • Sometimes, due to viruses, this file may be hidden. Read the article.
  • In the two described methods (redirection and acceleration), the desired result may not be obtained. The fact is that several sites can be located on one IP address, this is especially true for external IP addresses that services provide.
  • Due to the fact that viruses love this file, its attributes can be changed to Hidden  and Read-only.
  • Check the file attributes if you cannot save the hosts file.

    Thus, you can easily and for free block access to sites in Windows by editing the hosts file.