• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Techbout

Technology Simplified.

  • iOS
  • Windows
  • Mac
  • Internet

How to Edit Hosts File in Windows 10/11

By: Sam Patwegar | September 19, 2024

If you are looking for a way to open and edit “Hosts File” on your Windows computer, it is likely that you want to rule out the possibility of this important File being modified by virus or malware.

The Hosts File can also be used to block access to websites on the computer, which is another reason for users looking for a way to open and Edit Hosts File.

Edit Hosts File in Windows 11/10

The default Hosts File on a Windows computer is located at C:\Windows\system32\drivers\etc path and it only contains a few comment lines starting with ‘#’ character.

Hence, any new lines that you see on the Hosts File without the “#” character have been either added by you or added by adware, virus or malware.

Advertisement

You can find below the steps to Edit the Host File on your computer by opening the Notepad app with Admin rights and navigating to the location of the Hosts File on your computer.

1. Click Note in the Search box > right-click on Notepad and select Run as Administrator option.

Run Notepad As Administrator

2. On the next screen, type your Admin Password and press the Enter key.

3. In untitled Notepad, select the File tab and click on Open.

Open File Option in Notepad

4. In Open File dialogue box, type C:\Windows\system32\drivers\etc as the ‘File Name’ entry.

Type Path to Windows Hosts File

Note: Alternatively, you can navigate to C:\Windows\system32\drivers\etc using the left pane menu.

5. To View Files in “etc” Folder, use the Down Arrow to switch to All Files view.

Switch to All Files Type

6. Once the Files are visible, select hosts file and click on the Open button.

Open Hosts File in Notepad

7. After making changes to Hosts File > select the File tab and click on Save.

Save changes to Hosts File

In above example, a new entry has been added to the Host File to block Facebook on the computer by mapping its domain name to localhost (127.0.0.1) or 0.0.0.0.

Sam Patwegar

10+ years experience in writing fluff-free troubleshooting guides with just the right and required amount of related information. Equally capable of In-depth technical writing.

Related
  • Google Chrome Is Not Updating: How to Fix?
  • How to Disable Hibernation and Delete Hiberfil.sys
  • How to Check Computer Specs in Windows 10/11

Primary Sidebar

Advertisement

Recent Posts

  • Fix: System Tray Icon Missing in Windows 11/10
  • How to Use Internet Explorer in Windows 11
  • Fix: Cast to Device Not Working in Windows 11/10
  • Fix: MacBook Camera Not Working Issue
  • Multiple Ways to Disable Face ID on iPhone

Advertisement

© 2025 Techbout.com · All Rights Reserved
About | Privacy Policy | Terms | Contact
Twitter(X) | Facebook