Home / Blog
hosts file location

Hosts File Location in Windows 11 and How to Edit It

Find the Windows hosts file, edit it with administrator rights and preview a website on a new server before DNS changes.

SkipLink EditörPublished: 20.06.20261 min read
Partner toolsSelected services

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

  1. Run Notepad as Administrator.
  2. Open the hosts file and select All Files in the file picker.
  3. Add the server IP followed by the domain: 203.0.113.10 example.com.
  4. Add a separate entry for www when required.
  5. 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.

Partner toolsSelected services