How to Edit Hosts File in Windows 11

Since it is called on the web, I call it on my machine. I set up the Apache vhosts file to show the virtual host name as and the alias as , and the directory as /users/me/sites/whatever. I have create a console-based hosts file editor for windows so that you can edit the file without any hassles.

However, in some versions of Windows, editing the hosts file directly isn’t allowed. In fact, you’ll get an error if you try to save the changes. Fortunately, there’s a simple tip you can use to edit the hosts file in Windows 10, 8, 7, Vista, or XP. If you have been wondering how to add hosts to Windows 10 for the first time, here are a few steps that you can take. Click on the line that says “Non-default host entry”.

How to copy files to Windows containers

Hosts Optimizer can be downloaded from the abelhadigital forum. The program is also part of the hosts manager HostsMan. You can see the idempotent nature of the script in this screenshot.

And if you have enabled DNS over HTTPS from the PC settings, you don’t need to do anything. Windows 11 will take the hosts file into account. If you want to find the Windows 11 Startup folder in Windows 11, use our linked guide. And to find your MAC address in Windows 11, we have a handy guide for that as well.

  • A computer with a maliciously modified hosts file can send someone to a duplicate copy of a bank web site, one that looks totally legit, but is designed to steal userids and passwords.
  • In this menu, select File Explorer from the list.
  • Note By default, the Hosts file is in the %systemroot%\system32\drivers\etc folder.
  • You can add or remove entries and then save the file to disk.

Windows Server 2008 can only install PowerShell 3.0; specifying a newer version will result in the script failing. MSConfig has locked me out of windows – need to reset back to default. If the Hosts file is changed from default, resetting it can help resolve some connectivity issues.

Doing so confirms your settings and blocks YouTube on your computer. In the text box at the top of the pop-up window, type in whatever you want to name your network. This is the email address you used when setting up your OpenDNS account. It’s an orange button at the bottom of the page. This creates your account and sends a verification email to your email address.

#2 Windows 7, and older versions

However, a computer may well have several ways of connecting to whatever LAN in question. Perhaps using an USB hub or Tunderbolt dock, sometimes, and these are then other interfaces. DHCP ID can handle this b ut it becomes VERY cumbersome. THERE SHOULD BE a very trivial way to get around this. So, with ping CHOSENBONJOURNAME.local specifically on Mac OS X and macOS we can fetch the IP address.

Common steps regardless of your development environment

To edit the hosts file, you need to have administrator rights. Notepad is available by default in Windows 10, but you can also use Wordpad or other text editors. However, be careful as Wordpad can mess up the hosts download chrome-elf_dll file. To change the hosts file, navigate to ‘etc/hosts’ and open Notepad in administrator mode.