This tutorial is about editing the Hosts file in Windows 10/11. We will do our best for you to understand this guide. I hope you will like this blog How to Edit Hosts File in Windows 10/11. If your answer is yes, please share after reading this.
Check How to Edit Hosts File in Windows 10/11
The Hosts file on a Windows computer is a special file that allows you to manually map specific domain names to an IP address, as opposed to automatic mapping through Domain Name System (DNS), which is really just a method decentralized to name/assign the various computing devices. And after making the necessary changes in the Hosts file, your Windows will look for the specific hostname in your Hosts file to connect to the IP address specified there instead of relying on DNS. You might be wondering why you should modify the Hosts file.
There are many reasons for this. For example, this can be useful if you want to block users from accessing certain websites. Moreover, it can serve as an extra layer of security and help protect you against various spyware/adware that might otherwise attempt to hijack your default DNS settings. Another way is that you can test a website before it goes live. These are some of the most important reasons why you should edit your Windows hosts file.
Editing your hosts files isn’t that easy, but we’ve broken the whole process down into simple steps to make sure nothing can go wrong with your internet connection. However, for added security, we recommend backing up your Windows settings. We can now start the actual assembly.
How to Edit Hosts Files in Windows 10/11
First, make a backup of the hosts file
Before modifying your hosts file, you should create a backup of the hosts file. If something goes wrong, you should be able to restore it to a working version.
- Launch File Explorer on your PC, then navigate to C: → Windows → System32 → Drivers → etc folder. If your Windows is on another drive, you will need to replace the C: drive with the drive where Windows is installed on your computer.
- Alternatively, you can also copy and paste the file path below into File Explorer and press Enter to open the hosts file folder.
- You would see a file named hosts in this folder. Copy the hosts file and paste it to another location for backup. You can also save it in the etc folder with another name, but it will ask for admin permission to do so.
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.
- 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.
Final Words: How to Edit Hosts File in Windows 10/11
Hope you understand this article How to Edit Hosts File in Windows 10/11, 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.