The file C:\Windows\System32\drivers\etc\hosts isn't working and is being ignored?
The file C:\Windows\System32\drivers\etc\hosts isn't working and is being ignored?
I have a fresh Windows 10 Pro installation, completely updated. It functions properly, but I'm having trouble adding aliases for local network devices. The title file is intact and has proper permissions. I can ping the IP address on my NAS, but I prefer using "nas" instead of the full address. I've tried opening it in an editor that displays hidden characters like tabs and newlines. The file has been restored and edited with various tools (running as admin). The changes are visible to regular users, and they work across other Windows 10 systems. I've rebooted and cleared the DNS cache multiple times. If the file is sound, permissions are correct, and syntax is fine, what adjustment would allow the "C:\\Windows\\System32\\drivers\\etc\\hosts" file?
there is a typo in the path? an extra character in the path.
correct version should be: c:\windows\system32\drivers\etc\hosts
note: an old issue in cmd.exe removes leading backslashes.
this matches what was mentioned, though newer Windows versions may have fixed some of these bugs due to optional settings.
The path is accurate. Also, the file wasn't manually edited to change the format; that's just the display. "C:" refers to the C drive; starting with "\", followed by the absolute path is "C:\". Browsers convert a forward slash into "http" when viewing it, but the root remains the same. Regardless, my editor opened this from Windows file explorer, and the comments at the top were actually present. No error. I'm just unsure why edits are being skipped. There must be a bug, though—I'm not sure what it is. I've tried this on several Windows 10 systems, and none have ever been ignored until now.
This is quite unusual.
Consider using HostsMan?
HostsMan · abelhadigital.com
HostsMan is a free software tool that helps you manage your hosts file easily.
www.abelhadigital.com
You can also configure a local DNS such as Technitium DNS
DNS functions properly. The custom alias for nas and printer is causing the issue, while the rest operates correctly.