This article explains how to edit the local hosts file with PowerToys in Windows 11.
Microsoft PowerToys is a set of free tools and utilities for power users to help them customize and optimize their Windows experience. It includes features such as a color picker, a keyboard manager, a window manager, and more.
One feature included with the PowerToys utility is the ability to edit the local hosts file without having to navigate to it manually and open it in a text editor with administrator privileges.
The local hosts file is a plain text file on your computer that maps hostnames to IP addresses. When you type a website address in your browser, your computer checks the hosts file first to see if it already has an IP address for that website. If it does, it goes straight to that website. If not, it asks a DNS server to translate the website address to an IP address.
The steps below show you how to do that with PowerToys’ Hosts File Editor.
Use PowerToys to edit the local hosts file
As mentioned above, users can use the Microsoft PowerToys utility to edit the device’s local hosts file without having to navigate to it manually and open it in a text editor with administrator privileges.
Here’s how to do that.
First, install the PowerToys on Windows.
Once PowerToys is installed, please open it and select Host File Editor on the left menu.
On the right, select the
Enable Hosts File Editor tile, then toggle the switch to the
Select the “Launch as administrator” tile, and toggle the switch button to the On position to enable it.
To turn it off, toggle the button back to the
Once both features are enabled, you may have to restart PowerToys to save or apply the changes.
Once enabled, click the return to Hosts File Editor and click the “Launch Host File Editor” to open it.
Next, click the New entry button.
On the pop-up window, type in a new address and host you want to add to the hosts file, and click Add.
Once you add a new entry, the host should be accessible from the local machine.
That should do it!
This post showed you how to add a new host entry in the local hosts file in Windows 11. If you find errors above or have something to add, please use the comments form below.