Why can’t I save the hosts file. How to change the hosts file

The note says about the “suffering” system file hosts, who often gets tired of the latest “scraps” that have leaked onto the computer. Hosts there is no expansion, but in essence it is primary text file And for editing, use the newly installed Notepad. File assignment – ​​save a list of domains and subtypes IP-Address. This is the list to which the browser immediately opens up after entering, say, a domain name in the address bar Yandex.ru, to find out what the address 77.88.21.11 represents.

Now you can see that the malicious program has changed the hosts"IP" Yandex.ru to the required address of the “Smith” site. Now immediately after character typing in the browser Yandex.ru you will stumble on Yakomu XXX.com. Obviously, this inconsistency needs to be promptly pinned down; you may end up going straight to the file hosts. I will state the guarantee method, because V remaining versions Windows The retailer has strengthened the security of the OS, which in practice has made life more difficult for those who earn money: if you don’t need a folder, you can see that the file itself can’t be edited.

Ozhe, for the sake of bringing hosts the "divine" look open the trace "Notepad" under the administrator's name. For this let's go to the menu "Start"→ far," All programs" → "Standard" → click right key Misha on Notebook and in the context menu you can select "Run as administrator ".

The top panel that appears is embossed with " File " → "Vidkriti→ in the address row you can specify the route to the required folder – C:\Windows\System32\drivers\etc . If the folder appears empty, write in the “File name” row hosts and click " Vidkriti(Advance screenshot).

Instead, the file can be aligned with the original Windows 7 And, if there are differences, copy your own.

# Copyright (c) 1993-2006 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file should be mapped IP address to host names. Each # entry should be kept on an individual line. IP address should # be placed in the first column followed by the corresponding host name. # IP addresses and host names are to blame for being placed within the same # space. # # Additionally, comments (sub as these) can be included on individual # lines or following the machine name is designated as the "#" 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

In principle, you can delete just one record - 127.0.0.1 localhost but it doesn’t deprive anything of anything – any option would be better, but not unlike the one in the screenshot below ( real butt editorial staff hosts virus-virus).

Yak bachite, "malicious" blocking the update antivirus programs and access to social media sites. To ensure that the situation does not repeat itself, it is recommended to hijack the file with the " Only reading", clicking on hosts right button mishi → " Powerful→ on the first tab, check the box opposite the relevant attribute.

You can find out about those that are more valuable from the system file hosts I will tell ours.

U to this helper I have the utmost respect for those who can change it hosts file in Windows 10, we are aware of the meanings and details of what is, at first glance, inconspicuous text document, we know that it is possible to resolve and understand the problems if changes in hosts do not produce the desired result.

It is important to know that all of the information provided in this article is in many respects relevant for Windows 7 and 8 in any edition.

What is it?

Hosts (without extension) is a text document in which the transfer of domain names and IP addresses are placed, which must be verified for their broadcast. Reverting to this file has a higher priority than the DNS server provided by the Internet provider. Instead, you can change whoever owns your computer has system administrator privileges.

Through the use of the following hosts, you can speed up the acquisition of web resources and block unwanted messages from them.

Mіstse roztashuvannya hosts

This is a small section of creations for those who do not know where the hosts file is in Windows 10.

The document is expanded in the same way as before, in the etc catalog under the address Windows System32driver. It does not have an extension, but can be read with any text editor, such as Notepad++ or standard Notepad, integrations for Windows 10

The document can be changed, which the client will rarely require. Still, it’s good to know about this function. Let's bring everything down to a lower rank.

  1. Click on the system database editor by typing “regedit” in the “Windows” row or search for Windows 10.
  2. Let's go to the HKLM section.
  3. In the SYSTEM subsection, go to CurrentControlSet \ Services \ Tcpip.
  4. Open the Parameters checkbox.
  5. You can change the value of the DataBasePath parameter on the new route where the stream hosts will be transferred.


Editing hosts

Opening a file in the save changes mode can only be done by administrators or cloud accounts with privileged rights.

1. For whom it is launched text editor(Look at the integrated Notepad application) as an administrator. You can launch the notepad by quickly searching in a row.


2. Through the “File” item, click the command to open documents or press the key combination Ctrl + O.

3. From the right-hand drop-down list, select “All files”.

4. Specify a document called hosts.


As a rule, all document lines begin with the # symbol, which means a comment. So, functionally, the document does not contain any information.


The edit is based on the added new row, the first go IP addresses, and through the space there is a URL to a web resource, where the browser or any other program will be redirected when entering the specified IP.

To block any resource, enter a row like “127.0.0.1 www.adres.com” (for example, blocking the VKontakte site).


Sometimes you have to change the access rights to a file through the “Security” tab in hosts and become its owner.

Update of the cob host in the middle of Windows 10

The original text document hosts, which was designated, is functionally absolutely clean and does not interfere with the operation of the computer. If after installing any program, the document recognizes the changes, and you don’t know how to go back, because the file is not located at the specified address, and the registry entry has not changed, perform such operations.

1. Using the context menu in any folder, be it the Work Desk or the directory itself, etc., create a text document and rename it to hosts without extension.

You may need to activate the option to display file extensions in the Explorer settings of the Windows Panels. In the “View” tab, set the order of the specific options.

During the renaming process, it is possible that the file may not be opened correctly.

2. If the folder for creating a text document is not etc, it is copied to this directory, located at the address Windows System32drivers.

Problems with hosts

Changes made to hosts should take effect immediately, without requiring a computer restart. Failures are lost if changes are not made. Here you need to check the correctness of the adjustments made. If everything is correct, I’ll give it a try.

  • We click on the command row through search with administrator rights.
  • Configure “ipconfig /flushdns” in it and close cmd at the end.
  • We check that the problem has been fixed.

However, the proxy server is enabled.

1. Go to “Browser Powers” ​​in the Control Panel, switching the appearance of its icons to “Icons”.

2. In the “Connections” tab, click on the icon, which indicates that the network has been configured.


3. Uncheck all the checkboxes and install the new system configuration.


This is to put a check on the most important problem.

The hosts file contains the table of domain names' subtypes and network addresses. Information about the availability of an address queried from the table in the hosts file may take precedence over information requested from the DNS server. As you know, every website address on the Internet (domain name) is assigned its own IP address (fence address), followed by Merezheve obladnannya Find out about the website. The entry in the hosts file eliminates the need to obtain from the DNS server the IP address associated with the site address, which is entered in the address bar of the browser, which, by doing so, speeds up the speed of visiting the site.

And if you make an entry in the hosts file, in which address of the site on the Internet is set to the local IP address 127.0.0.1 (Localhost), you can block access to that site.


Starting with Windows 2000, the hosts file is usually located at local disk with an operating system behind the address C:\Windows\System32\drivers\etc(since the system is installed on drive C).


To edit hosts operating system Windows 10 requires any text editor, which is also included in Windows Notepad either WordPad, launched with administrator privileges, or a special program. Merezheva's addresses are similar to yours domain name Sign up in one row, with one or more clearings between the entries. The hash mark # indicates comments.

1 way Change hosts for additional command line help.

You can open the hosts file to edit and save changes using the command line. We can reveal it by quickly asking. Enter the field by search cmd This launches the command line as administrator.

Then at the field command line enter the command:

notepad C:\Windows\System32\drivers\etc\hosts

where notepad is called a program (Notepad) and C:\Windows\System32\drivers\etc\hosts - go to the hosts file (if the system is installed in a different partition, enter the letter of the partition on which the system is installed) and press Enter .

2 Method. For additional help from Notepad, please contact the administrator.

Yak bulo said more, for editing host file s required administrator rights. The administrator's cloud account has been disabled in Windows. To turn it off, you need to run Command Row as administrator.


In the command row window, enter the command net user Administrator /active:yes and then press the Enter key.

The message is about the success of the team's victory.


After that, log in under the newly created administrator account. As an administrator, you can easily make changes to the hosts file and save changes. Go to the folder located at the address C:WindowsSystem32driversetc, and from the context menu, click the right mouse button, select the item “Seek help”.


Then we select the program we want to open (for example, Notepad), and press “OK”.

3 ways. change the hosts file using Notepad from the cloud account of the account manager.

The other method does not require authorization under the administrator, since this cloud account is active and a password is set for it, then on some accounts the system will require your entry.
Our task is to launch the editor with administrator rights and then open and edit the hosts file. We will be the editor of Wikoristovati Notepad. To open it, we can enter the word notepad in the search engine field, and then click context not menu with the right mouse button, select the item “Run as administrator”.

Or go to the folder at the address C:\Windows\System32, find the notepad file in it and launch it as an administrator by clicking the last item in the context menu.


The editor window that opens has “File” → “Open” stamped on it.


Next, go to the hosts file (C:\Windows\System32\drivers\etc) and quickly open it.

4 ways For additional help with the Hosts File Editor program.

Another way is vikoristannya special programs to edit hosts. One such program is Hosts File Editor. You can enchant it by visiting http://hostsfileeditor.codeplex.com.
After filling in all the spaces in the table, click Save.


You can use the Hosts File Editor program to open the text version of the hosts file and see what comes out.



In some situations, you may need to change the hosts file in Windows 10, 8.1 or Windows 7. Sometimes the reason for this is viruses and useless programs that make changes to the hosts, so you can’t go to the song sites, and sometimes you you may want to edit the entire file in order to limit access to any site.

This instruction tells you how to change hosts in Windows, how to correct this file and turn it back into memory using the system and other third-party programs, as well as some additional nuances that may be useful.

richly third party programs for troubleshooting robotic measures, customizing Windows or see the place Discount programs It is also possible to change or correct the hosts file. I'll point two butts. cost-free program DISM++ for customization Windows function 10 z bagatma additional functions The “Dodatkovo” section has the “Hosts Editor” item.

All you have to do is launch the same notepad, but with administrator rights and open it required file. Koristuvachevi will no longer be able to make changes and save the file. The report about the program and where to look at the statistics.

Doctors who make unnecessary changes to the hosts file may appear to be the result of faulty programs, so it is logical that their functions can interfere with the functions of the file. This is an option for the popular catless scanner AdwCleaner.


All you need to do is go to the program settings, click on the “Drop hosts file” item, and then scan and clean in the main tab of AdwCleaner. The process's hosts will also be corrected. Report on all other programs in review.

Create a shortcut to change hosts

If you often manage hosts, you can create a shortcut that will automatically launch Time Notepad. open the file in administrator mode.

Why click the right button on the bear in any case to the free man desktop, select “Create” - “Shortcut” and in the “Indicate object resizing” field enter:

notepad c:\windows\system32\drivers\etc\hosts

Then click “Next” and enter the name of the shortcut. Now, right-click on the created shortcut, select “Authority”, on the “Shortcut” tab press the “Additional” button and select so that the program runs as administrator (otherwise we won’t be able to save this hosts file).

I suspect that for some readers the instructions will turn out to be redundant. If you don’t want to go out, describe the problem in the comments, I will try to help. There is also additional material on the site: .

Is the Hosts file needed?
Nominated system file- Assigning song IP addresses to song sites.
This file is susceptible to all kinds of viruses and malware in order to register it in your data or simply replace it.
The result of these actions may be “paste” signs for the site in browsers, which require you to send an SMS when the browser is open, or blocking of various sites, at the discretion of the virus creators.

Where is the Windows hosts file located?
For different versions Windows OS has modified the hosts file a little differently:

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, it’s over hosts, which is already an end file, not a folder. There is nothing in it.

How can I look correct file hosts?
“Instead” of the hosts file, it’s just a little different for different windows versions but not especially. Nyomu has it "written" on English This is not necessary and how to avoid blame from the points of one butt. All lines that begin with a # sign mean that they are commented out and do not appear in the file.
Zmist original file hosts for Windows XP:


#

#




#Space.
#


#
# For example:
#



127.0.0.1 localhost


Substitution of the original hosts file for Windows Vista:

# Copyright (c) 1993-2006 Microsoft Corp.
#
# This file is the same as the HOSTS file for Microsoft TCP/IP for Windows.
#
# Map this file mappings IP address to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column by the corresponding host name.
# IP address and host name should be separated by at least one
#Space.
#
# Additionally, comments (such as these) can be inserted on individual
# lines or following the machine name specifically 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


Replacing the original hosts file for Windows 7:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This file is the same as the HOSTS file for Microsoft TCP/IP for Windows.
#
# Map this file mappings IP address to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column by the corresponding host name.
# IP address and host name should be separated by at least one
#Space.
#
# Additionally, comments (such as these) can be inserted on individual
# lines or following the machine name specifically 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


Replacing the original hosts file for Windows 8:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This file is the same as the HOSTS file for Microsoft TCP/IP for Windows.
#
# Map this file mappings IP address to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column by the corresponding host name.
# IP address and host name should be separated by at least one
#Space.
#
# Additionally, comments (such as these) can be inserted on individual
# lines or following the machine name specifically 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 handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost


How you can reconnect, instead of the host file for different versions of Windows, there are no special features.

How to open and change the hosts file?
The hosts file can be used in standard Windows Notepad.
The axis is here, perhaps, itself tsikava partina statti.
We need to understand first, but are you planning to change this file? So, to block access to other sites. In this manner, having changed Denmark file And having registered in a new address on the site, the koristuvach will not be able to access the new one through any means.
In order to change the hosts file, you must open it as administrator (), right-click on the file and select "Run as administrator". Or open Notepad this way and then open the file.

For quicker action, you can simply press the Start button and select Viconty ( win+r) () and enter the following row:

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



As a result, this file will open in Notepad.

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

127.0.0.1 test.ru


As a result, the file will be like this:

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

# This is the HOSTS file of the creations for the Dr.Web Anti-rootkit API

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


If you want to block a new site, you need to start from a new row and register it without forgetting the local IP address 127.0.0.1

Also, to edit the hosts file, there is a program HOSTS EDITOR, enchant and read the description is possible from.
The principle of its operation is that it helps edit the hosts file.
This screenshot is based on the most intelligent principle of the robot, everything can be done in a couple of clicks. The addition is made by pressing the way on +.


After editing, do not forget to press the save button (2nd “Save changes” button, left-handed from the “+” button).

You can also change this file for good purposes, for example speed up the site's popularity.
How does this work?
When you access the site, you will read its domain name, as indicated by the letters. All websites on the Internet are assigned to an IP address, and their names are assigned to DNS wikis. I won’t go into detail about this process, it’s not about that. But here you need to know that the hosts file has priority when downloading to sites, and only after that it will be asked to DNS.
In order to speed up the popularity of a site, you need to know its IP address and domain.
The IP address of the site can be obtained from other services, for example, or.
Domain is the name of the site.
For example, a very popular site on which you read an article has clearly indicated the IP address and domain in the file.
So, what you get is:

91.218.228.14 website


This will speed up the browsing of the page in a couple of seconds, and sometimes you can give access if in standard ways You can't access the website.

Still possible redirect to another site for additional hosts file.
For this purpose it is necessary to know the IP address of the site and its domain (as in the above-described form), then the sequence that is obtained will be as follows:

91.218.228.14 test.ru


And now, after entering test.ru into the address bar of your browser, you will be redirected to the site with the IP address entered.

Whatever you want clean the hosts file, then you can earn it by simply viewing it instead and pasting it into original text, I will describe more (under spoilers).

Some nuances of the hosts file:

  • Always check what you have on the side and always scroll down the window. This is due to this, the virus is registered in the area captured between the windows.
  • In some cases, such as when you are unable to save the file, you will need to log in as an Administrator.
  • Otherwise, this file may be stolen through viruses. Read the article.
  • In the two described methods (redirection and acceleration), you may not see the desired result. On the right, there can be several sites on one IP address, which is especially true for external IP addresses that provide services.
  • Due to the fact that viruses love a particular file, its attributes can be changed Prikhovanyі Easy to read.
  • Change the file attributes if you do not want to save the hosts file.

    In this way, you can easily and costlessly block access to sites on Windows by editing the hosts file.