The Windows hosts file lets you map a hostname to a specific IP address on one computer. It is useful when testing a new server, validating a migration or opening a site before public DNS records change.
Windows 11 hosts file location
The file is located at C:\Windows\System32\drivers\etc\hosts. It has no file extension. Open your text editor as Administrator before loading the file, otherwise Windows may refuse to save changes.
How to add a hosts entry
- Run Notepad as Administrator.
- Open the hosts file and select All Files in the file picker.
- Add the server IP followed by the domain:
203.0.113.10 example.com. - Add a separate entry for www when required.
- Save the file and run
ipconfig /flushdns.
Preview without editing your computer
SkipLink provides a browser-based alternative. It resolves the real domain to your selected server IP while preserving the Host header and TLS SNI. Same-domain pages, CSS, JavaScript and forms stay inside an isolated, expiring preview link.
Remove test entries
Delete temporary hosts entries after testing. An outdated line can keep directing your computer to the wrong server even after DNS propagation is complete.

