What is happening
I have a simple Apache server set up on my machine, accessible via localhost on port 80. When accessing the following addresses :
It does work on Chrome/Firefox and other browsers
ping/curl to localhost works and returns a 200 response.
After adding an entry to my hosts file, to point a host name to localhost, it seems Chrome is not honoring the entries in the hosts file.
Let me explain, my hosts file looks like this now :
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
::1 mydomain.local
When accessing the host name mydomain.local
with Firefox/Edge/Other browsers it returns the default page of my Apache server as a 200 response.
ping/curl to mydomain.local
checks out successfully and shows it is actually pointing to localhost at the ::1 ipv6 version of localhost.
Yet somehow, Chrome throws an DNS_PROBE_FINISHED_NXDOMAIN
error on that host name.
What has been tried
- Fresh Chrome install
- Flushing Windows DNS cache with ipconfig
- Flushing Chrome DNS cache through chrome://net-internals/
- Disabling all DNS prefetching and protection settings (I just went through and disabled everything on Chrome https://i.sstatic.net/uAOfp.jpg)
- Running Chrome with the following flags
- --dns-prefetch-disable
- --disable-preconnect
- --incognito
- --start-maximized
- --disable-async-dns
All attempts unsuccessful
System setup
- Windows 10 Pro x64 (1809)
- Chrome Version 74.0
- Firefox Quantum 66.0.3
--
Edit I know that Chrome doesn't play well with some TLDs, I have tried different options, like .loc
.test
.localhost
without success
--
Edit 2
The referenced possible duplicate is 3 years old, and doesn't provide a solution. If there's no solution for this issue, is this behavior documented from Chromium ? That it doesn't allow hosts entries ?