Windows

Where Is the Windows Hosts File Located?

Windows hosts file path, why it is invisible in Notepad by default, and why editing needs admin rights.

Last updated

The hosts file sits in System32, under drivers, then etc. It has no extension, which is why it hides from Notepad unless you switch the open dialog to All Files.

Editing requires an elevated editor. Open Notepad as administrator first, then open the file. Saving from a normal Notepad window fails silently or with access denied.

Where Windows stores this, by platform

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

Same path on every modern Windows, also reachable as %SYSTEMROOT%\System32\drivers\etc\hosts. The folder also holds networks, protocol and services files; edit hosts only.

Frequently asked questions

Why can't I see the hosts file in Notepad?

The open dialog filters to .txt by default and hosts has no extension. Change the filter to All Files, then open it.

Do I need to reboot after editing hosts?

No. Changes apply to new connections. If a name still resolves the old way, flush the resolver cache and restart the browser.

Notice an outdated path? Let us know.