0

I made a change to my hosts file on my Windows 10 machine today, however after saving the changes in Notepad (running as admin) the changes do not appear to work.

For example I would expect this entry:

127.0.0.1 google.com

To stop a page from resolving to Google.com.

However, this doesn't appear to be happening and the web browser resolves to google.

Is there a cache setting I'm missing?

Thanks

Tikhon
  • 87
  • 9
  • 1
    Are you sure the page uses `google.com` and not `www.google.com`? Entries in hosts file are just for a single domain excluding subdomains. – Robert Sep 04 '21 at 19:55
  • Does this answer your question? [hosts file ignored, how to troubleshoot?](https://serverfault.com/questions/452268/hosts-file-ignored-how-to-troubleshoot) – djdomi Sep 05 '21 at 15:13

1 Answers1

3

You need to flush the DNS cache in Windows 10

Go to cmd and type

ipconfig /flushdns
ping google.com

now you shut return with 127.0.0.1 and restart your browser shut help to