Google Chrome Ignoring Hosts File

Solution 1:

Seems that Chrome doesn't likes the following extensions for that kind of stuff:

.dev
.localhost
.test
.example

Use .local and the problem seems to disappear.

Update from [George Udosen][1] suggestion:

.app is also ignored. [1]: Google Chrome Ignoring Hosts File

Solution 2:

This has been identified as a "bug" in Chrome, but it appears to be absolutely intentional behavior. Google Chrome does not honor /etc/hosts when connected to the Internet. It always does a DNS lookup to determine IP addresses.

While my references below mostly relate to my expereinces with this on Linux, it is not confined to Linux.

https://groups.google.com/a/chromium.org/forum/#!topic/net-dev/iKXqyc40tW0

https://superuser.com/a/887199/75128

https://bugs.chromium.org/p/chromium/issues/detail?id=117655

Solution 3:

Okay I faced the same problem but then I found the solution. Try this: Go to history (Ctrl+H) -> In the left pane click on Clear browsing data In the new window that opens go to Advanced tab Set Time Range to All Time -> check Cached Images and Files -> click on Clear data Restart your computer, It should start redirecting addresses mentioned in Hosts file (C:\Windows\System32\drivers\etc\hosts)

Note: This Solution is only for Google Chrome

Solution 4:

If anyone stumbles on this problem in 2021, for me the fix was to disable Use secure DNS option from chrome settings. After disabling that, all the options in the hosts file started working.

The option is located under Privacy and Security > Use secure DNS

Link to get there faster:

chrome://settings/security

Solution 5:

Try clearing the DNS Cache:

1) run cmd.exe as administrator

2) type: ipconfig /flushdns