How to Edit Hosts File in Windows 11 PC 2022 Tip

This tutorial is about editing Hosts file on Windows 11 PC. We will try our best for you to understand this guide. I hope you will like this blog How to Edit Hosts File on Windows 11 PC. If your answer is yes, please share after reading this.

Check How to Edit Hosts File on Windows 11 PC

The Hosts file is the first place Windows checks when connecting to a website. You can change it manually to block access to certain websites. Find out where the file is and how to edit it. When you type a normal web address to access a website, for example,, your PC does not automatically know how to connect. You need the correct IP address associated with the web address to connect. The Hosts file is the first place your PC looks for an IP address for a website, but by default the Hosts file does not contain one.

If your PC cannot find an IP address in the Hosts file, it checks the DNS cache or connects to a DNS server. When a web address and an IP address are included in the Hosts file, it provides that information to your computer each time you try to connect to that web address. If the Hosts file tells your computer to look for a web address at an IP address that does not allow a connection, such as, it will block access to the website.

If you’ve ever used a phone company’s phone book, you know how it assigns each phone entry to a specific person, business, or location. Similarly, any operating system’s Hosts file maps IP addresses to unique hostnames based on domains (or websites), name servers, proxies, and more.

How to Edit the Hosts File on a Windows 11 PC

Edit Hosts file using Notepad in Windows 11

  • First, open Notepad as an administrator. To do this, search for “Notepad” in the Start menu, then right-click on the Notepad application icon and select “Run as administrator” from the menu.
  • Windows will display a permission message asking, “Do you want to allow this application to make changes to your computer?” Click on the ‘Yes’ button. This will open notepad with admin privileges so you can edit the hosts file using.
  • Then, in Notepad, navigate to the “File” menu option and select “Open” from the menu. You can also use the keyboard shortcut ‘Ctrl + O’.
  • Next, copy and paste the address of the hosts file into the “File name” field of the Open dialog box and press Enter.
    • C:WindowsSystem32driveversetchosts
  • You can also manually browse and open the hosts file by navigating to C: → Windows → System32 → drivers → etc folder in the Open dialog. But first, you need to change the file type from “Text Files” to “All Files”, because the hosts file is not your standard text file.
  • The hosts file will open in Notepad and you can easily edit it.
  • Add the new IP addresses and domain names you want to resolve at the end of the file and save it with the keyboard shortcut Ctrl + S. Since we opened Notepad in administrator mode, you can easily save the file without any other permission.
  • And it’s. You have successfully changed your hosts file in Windows 11.

Final Words: How to Edit Hosts File on Windows 11 PC

Hope you understand this article How to Edit Hosts File on Windows 11 PC, if your answer is no, you can ask anything via the contact forum section linked to this article. And if your answer is yes, share this article with your family and friends.