If a hosts-file entry is not taking effect in Windows 11, first verify that you edited the real file at %WinDir%System32DriversEtc, saved it as hosts with no extension, and wrote the mapping in the right format. If the entry is correct but lookups still fail, investigate DNS or the network separately: the hosts file cannot repair an unreachable DNS server or blocked DNS traffic.
Start with the hosts file itself
Windows normally looks for the file at %WinDir%System32DriversEtc, usually C:WindowsSystem32driversetc. Microsoft’s hosts-file reset instructions describe the location and format for Windows 11 and Windows 10.
| # | Preview | Product | Price | |
|---|---|---|---|---|
| 1 |
|
Microsoft Windows 11 (USB) | $124.97 | Buy on Amazon |
| 2 |
|
Tech-Shop-pro Compatible with install Key Included USB For Windows 11 Home OEM Version 64 bit.... | $48.00 | Buy on Amazon |
As an Amazon Associate I earn from qualifying purchases.
1. Confirm the path
Open File Explorer and enter %WinDir%System32DriversEtc in the address bar. Check that the file you edited is in that system directory, not a copy in Documents, Downloads, or another folder. The variable form follows the Windows directory; on a typical installation it resolves to the path above.
2. Make sure the file is named hosts, not hosts.txt
A text editor may append .txt when saving a new file. In Notepad’s Save As dialog, choose All files for the file type and enter "hosts" as the filename. The quotation marks help prevent Notepad from adding a text extension. Confirm that the resulting file in the system directory is named hosts and has no extension.
#1 Best Overall
- Less chaos, more calm. The refreshed design of Windows 11 enables you to do what you want effortlessly.
- Biometric logins. Encrypted authentication. And, of course, advanced antivirus defenses. Everything you need, plus more, to protect you against the latest cyberthreats.
- Make the most of your screen space with snap layouts, desktops, and seamless redocking.
- Widgets makes staying up-to-date with the content you love and the news you care about, simple.
- Stay in touch with friends and family with Microsoft Teams, which can be seamlessly integrated into your taskbar. (1)
3. Edit the system copy with administrator rights
The system directory is protected, so an ordinary editor session may not be able to save changes there. Microsoft’s documented workaround for access denied is to start Notepad as administrator, then open the file from that elevated window and save it. See Microsoft’s instructions for modifying the Hosts or Lmhosts file.
- Open Start, search for Notepad, and choose Run as administrator.
- In Notepad, choose File > Open, browse to
%WinDir%System32DriversEtc, and change the file-type filter to show all files. - Open
hosts, make the change, and save. Approve the administrator prompt if Windows displays one.
Check that the entry is valid and active
4. Put the IP address before the hostname
Each active entry needs an IP address first, followed by one or more hostnames, with spaces or tabs between them. For example, a syntactically valid line has the form 203.0.113.10 example.test; use the actual address and hostname you intend to map, not this documentation example. Microsoft summarizes the format as an IP address followed by one or more hostnames, separated by whitespace.
5. Remove a comment marker only if the mapping should be active
A line beginning with # is a comment, so Windows does not use it as a mapping. If the intended entry starts with #, remove that marker and save. Blank lines are ignored and do not need to be deleted.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →6. Look for another active entry for the same hostname
Review the file for repeated entries matching the hostname you are testing. An old mapping can make the result confusing, and Microsoft’s PowerToys Hosts File Editor documentation notes that conflicting entries can affect precedence. Remove or correct stale mappings rather than assuming a universal rule for which duplicate entry wins.
Verify the lookup path before changing DNS settings
7. Check whether Windows is using the hosts mapping
The Windows DNS client checks its cache first, then the hosts file, and then a DNS server. When the queried hostname has a hosts entry, the client does not query the DNS server for that name. This is why an entry can affect a lookup even when the upstream DNS server has a different answer.
Test the exact hostname your application needs and compare it with the address in the active entry. Do not use nslookup as proof that the hosts file is being ignored: Microsoft documents that nslookup contacts a DNS server in a multi-server scenario, whereas the Windows DNS client follows its own resolution path. Also, do not assume every browser, VPN, proxy, or application resolves names identically.
Rank #2
- Video Link to instructions and Free support VIA Amazon
- Great Support fast responce
- 15 plus years of experiance
- Key is included
8. Separate a hosts-file problem from a DNS or network problem
If names without hosts entries also fail, investigate DNS configuration and network connectivity rather than changing hosts-file permissions. Microsoft identifies an incorrect or unreachable configured DNS server as a cause of DNS client timeouts. Check with your network administrator or connection provider before replacing DNS settings, especially on a managed network.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problems9. Check DNS filtering only when the symptoms point to it
DNS queries may also fail if a firewall or third-party security product blocks outbound DNS traffic on UDP or TCP port 53. That is a DNS/network path issue, not evidence that the hosts file needs broader permissions. Review relevant firewall or security-product rules only when ordinary DNS lookups are failing too, and avoid disabling protection as a blanket test.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Replace a damaged file or choose another editor
10. Restore Microsoft’s default sample if the file is corrupted or untrusted
If the file has malformed content or unwanted mappings you cannot confidently untangle, preserve it before replacing it. Microsoft’s reset procedure creates a clean default hosts file and retains the previous one as Hosts.old. Follow the Windows 11 steps in Microsoft’s reset guide: save the replacement as hosts using All files, keep the old file as Hosts.old, move the new file into the system directory, and approve the administrator prompt if requested. Add only the mappings you need afterward.
Consider PowerToys for repeated edits
For a one-time change, elevated Notepad is built into Windows and avoids installing another utility. If you maintain several entries, Microsoft PowerToys includes a Hosts File Editor with a graphical entry list and filtering; it runs as administrator by default and backs up the hosts file. Its documented default backup behavior deletes backups after 15 days while retaining the five most recent, and those settings can be changed. PowerToys can make edits easier to manage, but it will not fix an unreachable DNS server or blocked DNS traffic.
Microsoft describes temporarily mapping a hostname to a new server during a website migration as a Hosts File Editor use case; its 24–48-hour period is an example, not a universal DNS propagation guarantee.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




