On Windows Operating Systems, the hosts file is located here , C – is the drive Windows OS had been installed.
Make sure you have administrative access/privilege on the computer before attempting to modify it.
To show hidden folders in Windows 7, press the ALT key while in Explorer to bring up the File menu. Click on the View tab and then click on the Show hidden files, folders, and drives radio button under Hidden files and folders.
Now navigate to the directory above and open the hosts file and make your changes.
The syntax stays mostly the same across all platforms.
By default, you cannot see these hidden folders since they are system folders.Need to figure out how to edit the Hosts file in Windows 7?For the most part, it’s pretty much the same as Windows XP and Vista, but with a few extra hiccups!We can manually customize DNS name and IP address for specific sites in this file which will be helpful in several ways in Windows or Mac OS X.Hosts file is a plain text file without any file extension.PROBLEM: Firefox ignores the presence of the hosts file, never using it to resolve a URL.Even if the name appears in the hosts file and has been entered correctly, Firefox uses it as a search term in the default search engine.Basically it translates the host name to IP and IP to host name.So the browsing and accessing other network places/shares by ‘name’ will be smoother by avoiding DNS server requests.We can use that for the basic example for the typical syntax.The first part will be the location to redirect the address to, the second part will be the address that you will want to redirect, and the third part is the comment.Viewing the web site with the computer's IP address cannot possibly work, because all of the virtual hosts have the same IP address, which is the whole point of virtual hosting.The only way that virtual hosting can work is if the virtual hosts have different names.This guide shows you how to edit hosts file in Windows 10 and Windows 8.1 easily without any additional system tools.