Hosts File in Windows 11/10: Location, Edit, Lock, Manage

the Hosts file in Windows 11/10, is used to map hostnames to IP addresses. This Hosts file is located deep in the Windows folder. This is a plain text file and the original default Hosts file size is around 824 bytes.

Hosts file in Windows 11/10

In this article we will see its location and also how to manage, block or modify the Hosts file in Windows 11/10. We will discuss the following:

  • Host file location
  • Lock hosts file to prevent hacking
  • Block website using hosts file
  • How to edit the hosts file
  • Using the free software Hosts File Editor.

Let’s take a look at them.

Host file location

You may also be interested in:

The Hosts file on Windows is located in the following location:


Lock hosts file to prevent hacking

Imagine that you click and see a completely different website load in your browser. Malware can redirect web addresses on your computer by modifying your Hosts file. This is called the host file hijack.

To prevent Host file hijacking, you can go to it, right-click on it, select Properties, and make it a Read only file. This will lock your Hosts file and prevent anyone or malware from writing to it.

Block website using hosts file

To block a website using the Hosts file, simply add the following entry:

Although I don’t, many users like to manually add entries to block a particular website or websites from opening. Others like to download and use the list of known fonts like mvps.orgto add entries that block malicious sites from opening.

How to edit hosts files in Windows 11/10

To edit the Hosts file in Windows 11/10:

  1. open browser
  2. Navigate to the location System32driversetc
  3. Locate the hosts file
  4. Right click on it and select Notepad
  5. Make changes and save.

Now let’s move on to a detailed explanation.

To edit the Hosts file, go to the following folder location:


Here you will see the Hosts file. Right click on it and select Notepad. Make changes and save.

But sometimes, even when you log in with administrative credentials, you can to receive the following error message:

Access to hosts C:WindowsSystem32driversetc was denied


Cannot create file C:WindowsSystem32driversetchosts. Make sure the path and file name are correct.

In this case, type Notepad in Start Search and right-click the Notepad result. To select Execute as an administrator.

Open the Hosts file, make any necessary changes, and click Save.

Using the free software Hosts File Editor

If you are looking for an easier way, you can use free Hosts file editing software.

1]Use HostMan

Although you can always manually manage or edit the Hosts file, I suggest using a free third-party tool like hostsman to make.

HostsMan is a feature-rich tool that allows you to add, remove, and edit entries in the Hosts file. It also allows you to easily add third-party host lists that help block malware sites and allows you to easily enable or disable the Hosts file. Includes a built-in hosts file updater and hosts editor. It allows you to scan the hosts file for errors, duplicates, and possible hijacks, and also allows you to create an exclusion list. Another useful feature it offers is the Hosts file backup manager. Back up your Hosts file to a safe place and use it to restore it, if necessary.

Hostman also allows you to flush DNS cache, open hosts with text editor, count number of hosts, find duplicates, replace IP address, scan hosts for malicious entries, reorganize hosts, manage DNS client service and plus. In short, it’s the only host manager you’ll ever need. You can download it from your homepage.

2]Using SysMate Hosts File Manager

SysMate Host File Explorer

SysMate hosts the file manager and is another tool that allows you to do this. With Host File Walker, you can add as many records to system hosts file. It even allows you to backup and restore the Hosts file.

3]Using the Host File Editor Tool

Edit hosts file in Windows 10

Host File Editor is another good tool that you can use. It has the following characteristics:

  • Enable and disable the hosts file from the system tray
  • Cut, copy, paste, duplicate, activate, deactivate and move entries
  • Filter and sort host entries
  • Backup and restore various host file configurations when changing environments
  • Ping endpoints to check availability.

You can download it from here. It also offers a portable version.

POINT: How to manually reset the default Hosts file in Windows may also interest you.

If your browser has been hijacked, you may find this article about browser hijacking and free browser hijacker removal tools useful.

Hosts file in Windows 8

How useful did you find this content?

Click on a star to rate!

Average score 0 / 5. Counting of votes: 0

So far, no votes. Be the first to rate this content.

I'm sorry this content was not useful for you!

Let me improve this content!

Tell me, how can I improve this content?

You may also be interested in:

Deja un comentario