Where Does Windows 7 Store Host File
The computer file hosts is an operating system file that maps hostnames to IP addresses. It is a plain text file. Originally a file named HOSTS.TXT was manually maintained and made available via file sharing by Stanford Research Institute for the ARPANET membership, containing the hostnames and address of hosts as.

By on June 4, 2009 in A German translation of this article is available at. The subtle differences between 32-bit and 64-bit Windows present so many intricacies and pitfalls that even Microsoft employees seem to have trouble getting it right. I just stumbled upon a KB article that describes. The topic alone is funny enough – it is not as if the default hosts file contained great amounts of data.
An entry for localhost (IPv4 and IPv6) is all you need, and on Windows 7 / Server 2008 R2 not even that. But anyhow, there seem to be enough people asking MS support for this or they would not have troubled with creating a package (ResetHOSTSFileBackToDefaults.MSI) that basically empties the hosts file. Is Hosts 64-bit or 32-bit? As always, I am more interested in what the package does, and Microsoft is kind enough to explain that in most “Fix it for me” articles. As you probably know, the hosts file was, is and probably will always be located in%systemroot% system32 drivers etc. Simple enough. But wait: 64-bit systems have two system32 directories: one for 64-bit processes and the other for 32-bit processes.
Now, where would the hosts file be located – or are there even two (potentially different) files? The answer is: no, the hosts file exists only once on x64 Windows. And it is right where it belongs, in the 64-bit system32 directory. But where is that directory located on disk? Is it the one natively called system32, or is it SysWOW64?
Redirection Confusion This is where confusion kicks in. Many people, including the person writing MS KB article 972034, see the number “64” in the name of the folder SysWOW64 and think: yes, that must be the 64-bit version of system32. Nice thinking, but wrong. It is exactly the other way round. For compatibility reasons, the name of the system32 folder did not change in Windows x64, although on 64-bit platforms the folder does not contain 32-bit but 64-bit executables! That leaves the question of where to put the 32-bit files that 32-bit processes need – and also expect to find in system32? Obviously, the same DLL cannot be present twice in the same folder.
The requirement of two different system32 directories was solved. Actually there are two independent folders in any x64 installation: system32 and SysWOW64. The latter is shown to 32-bit processes under the name system32. 64-bit processes do not use SysWOW64.
How to Get to and Edit the Hosts File If you want to edit the hosts file, you first need to locate and open it – on Vista and newer with UAC enabled from an elevated process (with admin rights). The procedure is a little tedious. Here is how to do it with 64-bit Notepad:. Click on the Start button, type “notepad” and press CTRL+SHIFT+ENTER. Acknowledge the UAC dialog. Type CTRL+O. Navigate to C: Windows System32 drivers etc.
Select “All Files” in the bottom right corner. Now you see the hosts file. Select and open it. Ati ixp sb400 ac97 audio controller driver download. Make your changes and save it. If you want to access hosts from a 32-bit process, use one of the following paths. Please note that in both cases the full path must be used. Navigating to “etc” from the root does not work (because System32 is redirected and Sysnative is not shown in directory listings).%Windir% System32 drivers etc.
This works because file system redirection is disabled for the “etc” directory and thus accessing the 64-bit System32 works from a 32-bit process.%Windir% Sysnative drivers etc. Sysnative is an alias that can only be used from 32-bit processes to access the 64-bit System32 directory. I suggest putting a shortcut on the desktop for quick updates to the ‘hosts’ file. I find it to be one of the MOST useful files for blocking garbage URLs being accessed by otherwise useful sites for commercial or information gathering purposes. Keeping an eye on your status bar can be a very basic but often useful aid to alert you to some of this activity. Hovering your mouse over junk ads can also give you additional info. Also: If you can still find them, there are very good (reputable) ‘host’ files on the internet for legacy versions of windows (’95, ’98, etc.) that you can copy or cut-and-paste into the win7 hosts file.
These have hundreds of bothersome and downright nasty site addresses blocked in them, and are written in exactly the same format as the win7 file uses. Please note the usage of the number sign (#) for adding your own comments to the host file. This comes in very handy for adding your own dates and notes if you find that you need to delete a particular blockage because it closes an entire site that you often use.
Editing the might come in handy if you want to make custom domain redirects, block websites, or remove malicious entries set. It functions like a local copy of a. However, you might run into problems when trying to make changes to this file in some versions of Windows.
This is most likely due to permission issues; there's an explanation on how to bypass that below. How to Edit the Windows HOSTS File These instructions are valid for all versions of Windows, from Windows XP up through Windows 10. Open Notepad or another text editor like Notepad. From the File Open. Menu, navigate to the HOST file location at C: Windows System32 drivers etc. See Tip 1 for a quick way to open this folder. On the bottom right of Notepad's Open window, click Text Documents (.txt) and change it to All Files (.).
Several files should appear. This step is required because the HOSTS file doesn't have the.TXT. Now that every file type is showing, double-click hosts to open it in Notepad. Tips:. In Step 2, if you copy/paste the path to the HOSTS file into the 'File name' path of Notepad, you can quickly get to the folder without having to browse for it manually.
In Windows 7, 8, and 10, you can't save edits to the HOSTS file unless you open it directly from Notepad or another text editor (like the instructions from above). If you have difficulty saving the modified HOSTS file, check the file's to see if it's been marked. Cannot create the C: Windows System32 drivers etc hosts file. Make sure that the path and file name are correct. To still use the file you've edited, go ahead and save it to your Desktop or some other folder, and then go to that folder, copy the HOSTS file, and paste it directly into the location where the HOSTS file should be, as described above. You'll be prompted with permission validation and will have to confirm overwriting the file.
Windows 7 Store Apps
Another option is to open your text editor program as an administrator so that the permissions are already applied to the editor. Then, saving the HOSTS file over the original can be performed without having to verify your admin credentials. If you still can't save to the HOSTS file location, you probably don't have the correct permissions to be editing files in that folder. You should be logged in under an account that has administrative rights over the HOSTS file, which you can check by right-clicking the file and going to the Security tab. What Is the Hosts File Used For? The HOSTS file is the virtual equivalent of the phone company's directory assistance. Where directory assistance matches a person's name to a phone number, the HOSTS file maps domain names to IP addresses.
Where Does Windows 7 Store Host File Online
Entries in the HOSTS file override DNS entries maintained by the. While this might come in handy for regular use, like to block ads or certain malicious IP addresses, its functions also make this file a common target of malware. By modifying it, malware can block access to antivirus updates or force you to a malicious website. It's a good idea to check the HOSTS file periodically or at least know how to remove false entries. Tip: A much easier way to block certain domains from your computer is to use a that supports content filtering or blacklists.