Google Chrome Ignoring Hosts File

后端 未结 7 777
遥遥无期
遥遥无期 2020-12-16 08:41

Google Chrome is ignoring the settings in C:/Windows/System32/drivers/etc/hosts file. Both IE11 and Firefox are installed on the same machine and work as expec

相关标签:
7条回答
  • 2020-12-16 09:22

    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

    0 讨论(0)
  • 2020-12-16 09:30

    I just encountered this tonight and none of these options worked. I discovered that Chrome now hides "www" (https://www.howtogeek.com/435728/chrome-now-hides-www-and-https-in-addresses.-do-you-care/). Chrome was using my hosts file, but I had to add "www." to my hostname in my hosts file since that's what the browser is actually requesting, even if it doesn't show it.

    0 讨论(0)
  • 2020-12-16 09:31

    A little late, but after hours i find a solution. It seems that Google Chrome sometimes has problems on recognize the name of the hosts defined en /etc/hosts.

    I'm using linux and i'm behind a proxy.

    Try adding at the end of the name server: .localhost

    Example:

    At: /etc/hosts:

    127.0.0.1       myservername.localhost
    

    On the virtual-hosts of your server configuration you'll need to rename the server name. In my case, i'm using apache so at /etc/apache/sites-enabled/myserver.conf rename the line of the old server name with:

    ...
    ServerName:  myservername.localhost
    

    If you are behind a proxy, you can except all the hosts just adding to the no_proxy vars:

    $no_proxy= "localhost"
    

    Finally don't forget to restart the server and try to access on the browser with the new server name.

    0 讨论(0)
  • 2020-12-16 09:35

    Try clearing the DNS Cache:

    1) run cmd.exe as administrator

    2) type: ipconfig /flushdns

    0 讨论(0)
  • 2020-12-16 09:40

    While it was stated that no proxy is being used, I have had the same issue on OS X while using a proxy and the eventual solution was to add a proxy-exception for this domain.

    What the OP could try is turn off async DNS via command-line switch as mentioned here in 2015:

    Async DNS: Remove toggle from about:flags

    Async DNS is fairly stable at the moment, so we don't really need the toggle in about:flags anymore. (Note that the --enable-async-dns and --disable-async-dns command-line flags will still work for now.)

    This, however, seems to have no effect in my case, as chrome://net-internals/#dns still displays the internal DNS-client as enabled with no obvious way to turn it off.

    0 讨论(0)
  • 2020-12-16 09:43

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

    .dev
    .localhost
    .test
    .example
    .app
    

    Use .local and the problem seems to disappear.

    0 讨论(0)
提交回复
热议问题