Vienna (CodeName), popular in the computer world by the name of the Windows 7 operating system, is manufactured by the technology giant Microsoft and has many programs and features. One such feature embedded deep within the Windows OS is the windows hosts file. If you don’t know the installed version of Windows, here is how to determine Windows version.
Now while the name may sound big and techy, the fact of the matter is that the concept of host file was in existence long before the evolution of this modern era INTERNET; and remains in use to date.
It is necessary to understand the concept of Hosts Files because it might be a backdoor entry for the high jackers or malicious software since this file can be easily modified. These malicious software’s are generally used to redirect the traffic to a not so intended to visit the website. Also, we can easily eradicate the problem by just deleting those redirected entries from the windows hosts file.
Moreover, we can easily block any website which we do not want to open in our system. So, knowing the concept of hosts files has it’s perks. Additionally, you can easily boast around your friends by blocking any website in their system. Ain’t it great?
So, let’s dig a little deeper into this and explore the concept of the windows hosts file.
What Is A Hosts File?
The Hosts File is a plain text file used by an operating system in order to map Hostnames to IP Addresses. In simpler words, a Hosts file defines the relationship between Domain names and IP addresses, that is which domain name is linked to which IP address.
The host’s file is in existence from the time of ARPANET (Advanced Research Projects Agency Network), the predecessor of the INTERNET. The host’s file is like an address book or a directory.
What Purpose Hosts Files are Used For?
The Hosts File system facilitates the user by serving the facility of translating human-friendly hostnames like www.google.com into numeric type addresses, commonly known as IP addresses.
Hosts files can be used for blocking unwanted ads, 3rd party cookies, and hijackers. This can be easily accomplished by blocking those connections that serve as the source for the same.
How To Locate Hosts File?
In order to locate the Hosts File in Windows 7, simply follow the following easy going steps:
Step 1 : Click on Start -> Type Notepad -> Right-click on the Notepad shortcut -> Click on Run as Administrator.
Step 2: Once Notepad is opened, click on file -> open -> then browse to the mentioned location, that is C:\Windows\System32\drivers\etc
Step 3: In order to get the desired hosts file, do not forget to change the option of text documents (*.txt) to All Files (*.*) positioned at extreme right corner (bottom)
Step 4: Finally, Double click the file named hosts in order to open it and whoa, you made it.
Type in the following command in RUN (Windows + R).
How to edit hosts file?
In order to edit the hosts file, just follow till 3rd step as mentioned above after that do the following:
Step 1: Copy the host’s file and paste it somewhere else and make the changes you want to make in the copied file only.[Recommended and Important]
Step 2: After making the desired changes, replace it back in the C :\Windows\System32\drivers\etc folder.
How to block websites by editing hosts file?
If you want to block certain websites then you can easily attain that milestone by editing your host’s file.
For instance here, we have taken the example of www.myexamplesite.com.
Just add the following line in the host’s file replacing www.myexamplesite.com to your desired site name. 127.0.0.1 www.myexamplesite.com
you can block as many sites as you want just by adding them in the host’s file in the mentioned manner.
How does it work?
(127.0.0.1) This IP address is the universal IP address that is assigned to the localhost of the user ’s computer.
When the user will navigate to www.myexamplesite.com through a web browser, the computer will try to connect to itself because 127.0.0.1 is the IP address of the machine’s localhost and the machine probably would not find a web server running on itself ultimately resulting in failure and this way the blocked website will not open in the system.
Disclaimer: You might end up losing the original hosts file. So, better be careful.
Administrator rights of the system are required to do the needful. So, make sure that you have the administrative rights of the system.
Always back up the files before experimenting.
We hope that this article will definitely add some worthwhile value to your knowledge base and if you have any doubts or queries regarding windows 7 host files, do let us know through the comment section down below and stay tuned for more such How To’s. If your windows 7 PC is taking time in the startup process, you should minimize the startup program. Here is how to change startup Programs in Windows 7.