๐ช Windows Instructions
ย
๐ Hosts File Location:
C:\Windows\System32\drivers\etc\hosts
Open Notepad as Administrator:
Start โ All Programs โ Accessories
Right-click Notepad โ Run as Administrator
In Notepad:
Go to File โ Open...
Paste this into the "File name" field:
C:\Windows\System32\drivers\etc\hosts
Choose "All Files" in the file type dropdown (not ".txt")
Scroll to the bottom of the file and start a new line
Enter the IP address and domain(s):
(Use at least one space or TAB between entries)
Example:
192.168.0.10 example.com test.example.com www.example.com
Save the file and close Notepad
Restart all browsers and try loading the domain
๐ Hosts File Location:
/etc/hosts
Open the Terminal (Applications โ Utilities โ Terminal)
Run the following command to open the file in nano editor:
sudo nano /etc/hosts
Enter your admin password if prompted
Scroll to the bottom and add a new line like this:
192.168.0.10 example.com test.example.com www.example.com
Save and exit:
Press Control + O
to save
Press Enter
to confirm
Press Control + X
to exit
Flush your DNS cache:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Close and reopen your browser
๐ Hosts File Location:
/etc/hosts
Open a terminal
Edit the hosts file using your preferred text editor (example using nano
):
sudo nano /etc/hosts
Add the entry at the bottom:
192.168.0.10 example.com test.example.com www.example.com
Save and exit:
Press Control + O
, then Enter
to save
Press Control + X
to exit
Flush the DNS cache (varies by distro):
Ubuntu (systemd):
sudo systemd-resolve --flush-caches
Or restart your network manager:
sudo systemctl restart NetworkManager
Close and reopen your browser
This is a temporary fix. Once your DNS changes have propagated:
Edit the hosts
file again
Remove the lines you added
Save the file and flush DNS again (for macOS/Linux)