How to Find the Host File in Windows 10: A Step-by-Step GuideUpdated 9 days ago
To modify the file, open Notepad as an administrator, then browse to the hosts file location and select "All Files" to view and open it. After making changes, save the file without altering its extension.
Key Highlights for Finding and Editing the Hosts File in Windows 10
- What Is the Hosts File
The hosts file maps domain names to IP addresses and can be used to block websites or redirect traffic locally.
- Location of the Hosts File
- Path: `C:\Windows\System32\drivers\etc\`
- It doesn't have an extension, so look for the file named `hosts`.
- Accessing the Hosts File
Right-click the file and select Open with Notepad (ensure you run the editor as Administrator to make changes).
- Editing the Hosts File
- Block a website: `127.0.0.1 example.com`
- Redirect a website: `93.184.216.34 example.com`
- Add comments with `#`.
- Applying Changes
After saving, flush the DNS cache using the command: `ipconfig /flushdns` in Command Prompt (Admin).
- Troubleshooting
- If you can't save changes, ensure you're using administrative privileges.
- Restart the computer or clear DNS cache if changes don’t take effect.