HomeHow To GuidesHow To Edit HOSTS file, Where it is located in Windows

How To Edit HOSTS file, Where it is located in Windows

With hosts file, you can freely control the access to websites and network traffic. These files are used to override the DNS for a domain name. The changes will be applicable to the particular machine only. So, if you want to block any websites from your children, want to test any website before going live and in many occasions, this will be helpful.

The redirection IP and the domain will be given to the hosts file and it will be saved in the machine. Once the domain is specified with the redirection IP in the hosts file, the domain will directly look to the IP on the particular machine.

So, now after knowing what are host files, the below questions will raise in your mind. Where is the host file? Where is my hosts file located? how to edit hosts file?

In this guide, I have listed out the steps on how to edit your hosts file and where it is located. The location and how to edit hosts file steps are similar on all Windows operating systems.

Where is Hosts file in Windows located?

The HOSTS file windows will be located in the below path

c:WindowsSystem32Driversetchosts

The file doesn’t have any extensions.

How To Edit Hosts file in Windows:

1. Open Notepad as Administrator.

2. Now from notepad, open the hosts file by navigating to c:WindowsSystem32Driversetchosts

How To Edit HOSTS file, Where it is located in Windows - TechToLead

The file will not be visible as it doesn’t have any extension. So in the open windows, choose the formats as all files instead of txt files as shown in the screenshot.

How To Edit HOSTS file, Where it is located in Windows1 - TechToLead

3. Now the HOSTS file is available to edit in notepad.

4. Now add the domains you want to block/test in the file. Make the necessary changes to the file.

5. Now save the file. The changes will be saved in the hosts file.

That’s it.


Ad: Work as you travel the world and access your important Windows Applications from anywhere on any device with a cloud desktop by CloudDesktopOnline.com-one of the leading desktop as a service provider. Now you can be more productive with SharePoint and Office 365 by Apps4Rent.


If you like this post, Share it with your friends. Don’t forget to Subscribe our Feeds, Follow us on TwitterFacebook and Instagram.

Latest Posts