Instructions apply to Windows 10, 8, 7, and XP.

To do so:

Open Notepador another text editor like Notepad++.

In the text editor, selectFile > Openand launch the HOST file location atC:\Windows\System32\drivers\etc.

Notepad button in Windows 10 Start menu

SelectText Documents (*txt)in the bottom-right of theOpenwindow and change it toAll Files.

This step is required because the HOSTS file doesn’t have the .TXTfile extension.

When files appear in the folder, double clickhoststo open it.

C:\Windows\System32\drivers\etc file path in Note Pad’s Open dialog

Edit the HOSTS file and preserve your changes.

What If I Can’t Save the HOSTS File?

In some versions of Windows, you don’t have permission to save directly to the\etc\folder.

Screenshot of All Files option when browsing hosts file directory in Windows 10 Note Pad

You’ll be prompted with permission validation and will have to confirm overwriting the file.

Right-nudge the file and selectPropertiesto see the attributes.

Then, saving the HOSTS file over the original can be performed without having to verify your admin credentials.

Screenshot of hosts file in Open dialog for Windows 10 Notepad

What Is the HOSTS File Used For?

The HOSTS file is the virtual equivalent of a phone company’s directory assistance.

Entries in the HOSTS file override DNS entries maintained by theISP.

By modifying it, malware can block access to antivirus updates or force you to a malicious website.