How to Edit Your Windows Hosts file on Windows 11, 10 and 8

Last updated on

How to edit the Windows Hosts file in Windows 11, 10 and 8 using Windows Notepad. Useful for pointing domains to custom IP addresses during web development.

Windows 11, 10 and 8

  1. Click on the Start windows icon button to open the menu
  2. Type Notepad
  3. Right-click on Notepad and choose Run as administrator
  4. If you are prompted for an administrator password or for a confirmation, type the password, or click Allow or Yes.
  5. In Notepad, click File and Open, and navigate to the hosts file. It should be in C:\Windows\System32\drivers\etc
  6. If the folder appears blank, you will need to click the file extension dropdown where it says Text Document (*.txt), and change it to All Files (*.*).
  7. Open the file called hosts.
  8. In the Hosts file, make the necessary changes. For example, to point a domain name to an IP address, on a new line, enter 1.1.1.1 mydomain.com
  9. click Save on the File menu.

Windows Vista and Windows 7

  1. Click Start windows icon,
  2. Click All Programs
  3. Click Accessories
  4. Right-click Notepad, and then click Run as administrator.
  5. If you are prompted for an administrator password or for a confirmation, type the password, or click Allow or Yes.
  6. In Notepad, click File and Open, and navigate to the hosts file. It should be in C:\Windows\System32\drivers\etc
  7. If the folder appears blank, you will need to click the file extension dropdown where it says Text Document (*.txt), and change it to All Files (*.*).
  8. Open the file called hosts.
  9. In the Hosts file, make the necessary changes. For example, to point a domain name to an IP address, on a new line, enter 1.1.1.1 mydomain.com
  10. click Save on the File menu.

Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.

p.s. I increased my AdSense revenue by 200% using AI 🤖. Read my Ezoic review to find out how.

Leave a reply

Your email address will not be published.