Why is my hosts file not working?
3 Answers. Just changing the hosts file is not enough. You also need to flush your DNS cache. If the ping does not work, then it is likely that the permissions on the hostfile are incorrect.
Where is the hosts file in XP?
Windows NT, Windows 2000, and Windows XP
- Select Start > All Programs > Accessories > Notepad.
- Select File > Open.
- In the File name field, enter C:\Windows\System32\Drivers\etc\hosts.
- Select Open.
- Make the necessary changes to the file.
- Select File > Save to save your changes.
How do I know if my host file is changing?
Windows
- Press the Windows key.
- Type `Notepad` in the search field.
- In the search results, right-click `Notepad` and select `Run as administrator`.
- From Notepad, open the following file: `c:\Windows\System32\Drivers\etc\hosts`
- Make your changes to the file.
- Click `File` > `Save` to save your changes.
Do host file changes require a reboot?
You don’t need to reboot. Any changes you make to the hosts file are immediate. You used to need to reboot for changes to take effect in Windows 9x.
Do you need to restart after changing hosts file?
How do I restart the etc host file?
The next step is to open the hosts’ file in a text editor, and this can be achieved through the command given below.
- $ sudo nano /etc/hosts.
- $ vim /etc/hosts.
- $ sudo service network-manager restart.
- $ /bin/systemctl restart systemd-hostnamed.
- $ pkill -HUP dnsmasq.
Why is my host file not working?
if it works, then something wrong with ip or your entry. If it does not, hosts file is bad. Pay attention where it goes. It might try ipv6. That still means that hosts file is broken. Remove everything from it and leave only your entry or localhost.
How do I open a hosts file?
Once you’ve located the hosts file open it using Notepad. One thing to note: be aware that your windows installation might be in a different folder then the one mentioned above. ‘Windows’ is usually the default but it could also be ‘Winnt’ or something similar.
How to fix broken hosts file?
That still means that hosts file is broken. Remove everything from it and leave only your entry or localhost. Single line only, nothing else at all! Not even line breaks. Just stash it aside somewhere until problem is resolved.
What is the hosts file and why is it dangerous?
If a malicious person wants to hijack your browser and redirect certain addresses to another site they could use the hosts file to do this. All they would need to do is add an entry to the hosts file to redirect any number of sites.