Helping millions of people navigate the world of technology.

How to Locate and Edit Hosts File on Windows

Key Takeaways 
  • The hosts file is located in the drive path C:\Windows\System32\drivers\etc
  • You should ensure you can view hidden folders on Windows to access this file.
  • You can use the built-in Notepad editor to edit the hosts file.

Where Is the Hosts File Located in Windows

The host files are stored locally on your computer within the C drive. To locate the path, follow the steps below.

Step 1: Press the Windows + S key on your keyboard. Type This PC and click Open.

Open This PC

Step 2: Double-click on Local Disk C.

Double click on Local Disk C

Step 3: Navigate to the Windows folder.

Navigate to the Windows folder

Step 4: Scroll down and open the System32 folder.

Scroll down and open the System32 folder

Step 5: Search for the drivers folder and open it.

Search for the drivers folder and open it

Step 6: Double-click on the etc folder.

Double click on the etc folder

Step 7: Now, you can see your hosts files.

your hosts files

Alternatively, you can also open This PC and paste the following in the address bar:

C:\Windows\System32\drivers\etc\hosts

Note that you may have to make hidden folders visible to see the hosts file.

How to Edit Hosts File in Windows

Editing the hosts file in Windows is a straightforward process. To get started, you’ll need a text editor, and Windows conveniently includes Notepad as the default option. To modify the hosts file, follow these steps:

Step 1: Click the Windows icon and select the search box. Enter Notepad, right-click the app, and click Run as administrator. Select Yes when prompted.

Open NotePad 2

Step 2: Click File and choose Open from the drop-down menu.

Tip: You can also press Ctrl + O to launch the Open menu directly.

Click File and choose Open

Step 3: Paste the following in the address bar.

C:\Windows\System32\drivers\etc

Note: Switch the file type to All files instead of .txt, the default file type.

navigating to the etc folder

Step 4: Select the hosts file and click Open.

Opening the hosts file

Step 5: Now, you can edit the host file. Once edited, click File and choose Save.

Saving hosts edits

Also Read: How to fix Notepad not opening

Was this helpful?

Thanks for your feedback!

Last updated on 10 July, 2024

Leave a Reply

Your email address will not be published. Required fields are marked *

The article above may contain affiliate links which help support Guiding Tech. The content remains unbiased and authentic and will never affect our editorial integrity.