How to easily edit hosts file in all windows?


In this tutorial, I will show you on how you can edit hosts file in Windows Computer.


There will be situations where you need to block certain websites or connections. You do not need to use any software for that. Instead, edit the host files on your Windows computer to block or test websites locally.

Here’s how you can do it.


Windows 10 and  Windows 8

If you are running Windows 10 or Windows 8, use the following instructions:

  1. Press the Windows key.
  2. Type Notepad in the search field.
  3. Right-click Notepad on search results and select Run as administrator.
  4. Open the following file from Notepad:c:\Windows\System32\Drivers\etc\hosts
  5. Make the necessary changes to the file.
  6. Select File > Save to save your changes.

Windows 7 and Windows Vista

If you are running Windows 7 or Windows Vista, use the following instructions:

  1. Select Start > All Programs > Accessories.
  2. Right-click Notepad and select Run as administrator.
    Windows UAC window that requires your permission will appear.
  3. Click Continue to allow.
    Notepad opens.
  4. In Notepad, select File > Open.
  5. Open the following file from Notepad:
    C:\Windows\System32\Drivers\etc\hosts
  6. Select Open.
  7. Make the necessary changes to the file.
  8. Select File > Save to save your changes.