- Right-click on the "Editor" option in the start menu.
- Select "Open" from the menu.
- In Windows Explorer, open the hosts file located at
C:WindowsSystem32driversetchosts
. - You can now modify the hosts file.
How to open the hosts file
To open the hosts file, follow these steps:
- Open Notepad by clicking on Start → All Programs → Accessories → Notepad.
- Click on File → Open.
- Enter
C:WindowsSystem32Driversetchosts
in the file name field. - Click on Open.
- Edit the file.
How to open the hosts file with administrator privileges
To open the hosts file with administrator privileges, you need to run the text editor as an administrator. Follow these steps:
- Click on the Start menu.
- Type "notepad" in the search box.
- Right-click on the Notepad or Notepad++ (or any other text editor) shortcut.
- Select "Run as administrator".
- Open the text editor.
Where is the hosts file located?
The hosts file is located in the Windows system registry, specifically in system32 > drivers > etc > hosts
. Usually, the Windows system registry is located at C:Windows
, so it’s likely that your hosts file is located at C:WindowsSystem32driversetchosts
. For Linux, the path is /etc/hosts
. For Mac OS X, the path is /private/etc/hosts
.
How to modify the hosts file in Windows 10
To modify the hosts file in Windows 10, open Notepad by right-clicking and selecting "Run as administrator". Then, open the hosts file located at C:WindowsSystem32Driversetchosts
. Make the desired changes and save the file.
Where is the hosts file located in Windows 7?
For Windows 7 and earlier versions of Windows, to find the hosts file, select Start > Run, type %WinDir%System32DriversEtc
, and then click OK. Rename the file to "Hosts".
How to find the hosts file in Windows 10
In the case of Windows, you can find the hosts file in the folder %windir%System32driversetc
. To find it, press Windows+R and enter the mentioned path.
What can be done with the hosts file?
The hosts file serves the same function (associating host names with their respective IP addresses), but on the local operating system before contacting the DNS server and only for explicitly defined hosts.
How to modify the hosts file in Windows 7
To modify the hosts file in Windows 7, follow these steps:
- Open Notepad as an administrator.
- Start → All Programs → Accessories → (right-click and run as administrator).
- From the file menu, navigate to the folder
C:/Windows/System32/drivers
. - The
etc/
folder should now be visible.
How to modify the hosts file in Windows 11
The easiest way to modify the hosts file is to make a copy and replace the original file in the ‘etc’ folder. Open File Explorer by pressing the Windows key (WIN) + E. In the file list, right-click on the hosts file while simultaneously dragging the file to the desktop.