Steps to Edit the Hosts
File on Windows
-
Open Notepad as Administrator:
-
Press the Windows key and type Notepad.
-
Right-click on Notepad and select Run as administrator.
-
-
Open the Hosts File:
-
In Notepad, go to File > Open.
-
Navigate to
C:\Windows\System32\drivers\etc
and select thehosts
file.
-
-
Edit the Hosts File:
-
Add your DNS mappings at the end of the file. Each entry should be on a new line, with the IP address followed by the domain name.
-
Example:
192.168.0.1 example.com 127.0.0.1 localhost
Save the File:
- Click on File > Save to save your changes.
-