In this guide, let us talk through the process of editing hosts files in Windows 11.
What Is Hosts File in Windows 11?
A hosts File is a plain-text file on your system that allows you to connect to websites.
This process is called host file-based DNS resolution.
Next, lets understand how it’s possible for you to find hosts file on your system.
The steps are easy and we have listed them below.
1.PressWin + Eon your keyboard to open theFile Explorerapp.
2.Head to the driver where the Windows OS is installed.
3.Scroll down and open theWindowsfolder.
5.In the System32 folder, tap on thedriversfolder.
6.Go to theetcfolder, and there you’re able to find the hosts file.
We have explained all those three ways below in our article.
Using Notepad
The first and most straightforward way to edit hosts file is using Notepad.
2.SelectYesin the User Access Control pop-up.
3.In the Notepad app, click theFileoption and selectOpen.
you could also pressCtrl+Oto open a file.
4.On the bottom right, change the file bang out toAll files.
5.Navigate to the folder where the hosts file is placed or copy this path to the address bar.
6.Select thehostsfile and click theOpenbutton.
7.Now, you’ve got the option to make the changes in the hosts file.
8.On the saving page, select a location like your desktop.
Next, change the file punch in toAll files, and lastly, confirm to use onlyANSIorUTF-8.
After doing all these, click theSavebutton.
10.Reboot your system, and youre good to go.
Using Microsoft PowerToys
The notepad method is long and we get it if you dont want to follow it.
Thats why, heres an alternative.
If youre unfamiliar with the app, Microsoft PowerToys is a suite of free and open-source utilities for Windows.
1.Open theMicrosoft Store, search forMicrosoft PowerToys, and set up the app.
4.Click theNew entrybutton to add a new IP address and domain.
you’re free to also enable or disable any entry using the given toggles.
5.On the top right, the first button allows you to save the updates in the hosts file.
Let us see how we can edit the hosts file in Windows 11 using Command Prompt.
1.Press theWinkey on your keyboard to open theStart Menu.TypeCommand Promptin the search bar and select theRun as an administratoroption.
3.Execute the following command in the Command Prompt app.
4.Make the necessary changes to the hosts file.
5.Save the hosts file.
6.Close Notepad and reboot your system.
FAQs
Is It Safe to Edit the hosts File?
It is generally safe to edit the hosts file, but it is important to be careful.
Do I Need to Restart After Editing hosts File?
Generally, you do not need to power cycle your box after editing the hosts file.
It gets saved automatically.
However, you will need to cycle your PC for the changes in the hosts file to take effect.
Can I Create a hosts File?
Can I Reset My hosts File?
Yes, you’re able to reset your Hosts file.