How to easily edit host files in Windows 11

| |

How to edit Host file in Windows 11


Follow the steps below to edit your Windows 11 Host file:

  1. Open the Notepad as an administrator.
  2. Click on File > Open...
  3. Copy the address of the Host file to the "File name:" field and click on
  4. Enter the domain name and IP address at the appropriate place in Host file.
  5.  Click on File > Save to save the changes for good.

The Host file on a Windows computer is a special file that lets you map specific domain names to an IP address manually, as opposed to an automated mapping carried out by the DNS (Domain Name System), which is really just a decentralized method for naming/mapping the various computing devices.

And after you’ve made the required changes to the Host file, your Windows will look for the specific hostname in your Host file to connect to the IP address mentioned there, instead of relying on DNS.

But, one might ask, why bother modifying the Host file at all?

The reasons are numerous. For instance, it can come in handy when you'd like to block user access to specific websites. Moreover, it can also act as an additional layer of security, helping you keep the different spyware/adware that might otherwise try to hack their way into your default DNS settings. Another way it can help you is if you'd just like to test a website before it goes live.  These are some of the top reasons you should edit your Windows Host file.

While editing your Host files is no easy feat, we’ve broken down the whole process into simple steps to make sure things don’t go haywire with your internet connection. However, just to stay on a safer side, we’d recommend you take a backup of your Windows settings for the worst case; our complete system image backup guide will come handy in this.

Now, let's get started with the actual editing.

How to edit Host file in Windows 11

After you’ve created the backup, we can get started with the editing process, starting with opening the Notepad app. Follow the steps below:

  1. Go to the Start menu search bar, type in "notepad," and run the Notepad as administrator.
  2. Click on File and select the ‘Open…” option from the menu.
  3. Put the Host file address (C:\Windows\System32\drivers\etc\hosts) in the “File name:” option, and click on Open.

This will open the Host file on your Notepad, which you can then edit from here. Enter the IP address along with the domain name to configure the mapping.

For instance, if you want to point "Google.com" to IP address 124.234.1.01 (a non-existent IP), then type in the said IP address, followed by space, and the domain name. Also, don't add the hash symbol (#) in the beginning; if you do, the changes will not work.

Configuring the host file on notepad

Similarly, if you want to block a website, say facebook.com, then you can point it to 127.0.0.1 IP address. From here, you can add on multiple websites like this to your list if you want.

When you’re done, click on File > Save to save these changes. Make sure to reboot your PC when you are done with changes; this will ensure that all the edits are updated.

Editing the Host file in Windows 11

And that’s everything about editing the Host files, folks. With the Host file, you can map the domain names to the IP addresses of your choice. However, as we’ve said above, make sure your current Windows and Host settings are backed up to protect your files, just to make sure everything doesn't collapse in case something goes south. Hopefully, this articles helped you change your Windows 11 Host file without many hassles.

Share This Post:

Previous

Razer's Zephyr smart mask finally launched and sold out within minutes

GTA Remastered trilogy to be released on November 11, with GTA: San Andreas coming to Xbox Game Pass

Next