Test local name resolution with Hosts File Editor
Use a narrowly scoped hosts entry for a test, then distinguish file changes from resolver caching.
Publication & corrections: infostoa · Editorial standards
Individual author and specialist reviewer information is not provided for this article.
What the hosts file affects
Hosts File Editor is a PowerToys utility for editing the local Windows hosts file. Windows checks local host mappings when resolving names, so an entry can direct a test name to an IP on this PC. It does not control every network request or replace all DNS settings.
Add a scoped test entry
Enable Hosts File Editor in PowerToys Settings and open it from the PowerToys tray menu. Choose New entry, enter an approved test IP and hostname with a comment explaining the purpose, turn on Active, and select Add. For example, use a staging address and test hostname confirmed by the site owner, then verify that the test name reaches the intended environment in a browser. Do not substitute an unverified address for a production domain.
Revert and separate cache behavior
Before relying on recovery, check that Backups hosts file is enabled in PowerToys Settings. When enabled, a backup is created on the first save in a session; the default location is %SystemRoot%\System32\drivers\etc. If disabling an entry does not appear to change the result immediately, the Windows DNS client cache may be involved. Under your administrator’s procedures, inspect it with ipconfig /displaydns and use ipconfig /flushdns if appropriate. Apps can maintain their own state, so do not assume the mapping changed every active connection. Saving may fail without administrator permissions.
Sources: Microsoft Learn: Hosts File Editor · Microsoft Learn: ipconfig · Install PowerToys