Chrome on Windows not honoring hosts file, yet other browsers doWhy is Chrome ignoring /etc/hosts on OS...

Why didn't the Space Shuttle bounce back into space as many times as possible so as to lose a lot of kinetic energy up there?

Is the claim "Employers won't employ people with no 'social media presence'" realistic?

Get consecutive integer number ranges from list of int

Multiple options vs single option UI

What is the smallest unit of eos?

Map of water taps to fill bottles

Checks user level and limit the data before saving it to mongoDB

A ​Note ​on ​N!

Does tea made with boiling water cool faster than tea made with boiled (but still hot) water?

Check if a string is entirely made of the same substring

Contradiction proof for inequality of P and NP?

How do I deal with a coworker that keeps asking to make small superficial changes to a report, and it is seriously triggering my anxiety?

How come there are so many candidates for the 2020 Democratic party presidential nomination?

How exactly does Hawking radiation decrease the mass of black holes?

What is causing the white spot to appear in some of my pictures

Elements other than carbon that can form many different compounds by bonding to themselves?

Was there a shared-world project before "Thieves World"?

What happened to Captain America in Endgame?

Alignment of various blocks in tikz

Is Diceware more secure than a long passphrase?

Relationship between strut and baselineskip

Classification of surfaces

Could the terminal length of components like resistors be reduced?

Why does nature favour the Laplacian?



Chrome on Windows not honoring hosts file, yet other browsers do


Why is Chrome ignoring /etc/hosts on OS X?Chromium not checking hosts fileWhy is “localhost” slower than “127.0.0.1” in Google Chrome - Windows 8?How do i make Chrome use an IPv6 address from my hosts file?How to make Opera browser obey the etc/hosts file?Why does IE resolve https://localhost but Firefox does not?Chrome & IE can't access local website, while Firefox can. How to debug?Why can't Google Chrome resolve subdomains from /private/etc/hosts?Chrome doesn't respect Windows hosts but Firefox doesA weird DNS issueChrome Slow to Resolve /etc/hosts on macOS / OS XVirtual Hosts not working or redirecting in WAMP






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







2















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 :




  • http://localhost/

  • http://[::1]/


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://imgur.com/a/okB3ofG)

  • 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 ?










share|improve this question

























  • Possible duplicate of Chromium not checking hosts file

    – Ramhound
    yesterday











  • Why did you remove default 127.0.0.1 localhost from your hosts file? The duplicate is still accurate, Chrome doesn’t support the IPv6 address your using. Add 127.0.0.1 mydomain.local to the hosts file and it should work after a DNS flush.

    – Ramhound
    yesterday













  • I have not removed the entry you mentioned, that line is commented by default. Chrome does support IPv6 since it loads my Apache server at http://[::1]/ To your edit: That has already been tried and mentioned above in the post, still unsuccessful

    – Rezrazi
    yesterday













  • It’s way to early, some reason, I remember those lines being not commented. I can’t find a similar question that was asked recently, if ended up being the TLD, they changed it and it suddenly worked. However, your hosts file doesn’t mention trying the 127.0.0.1 entry.

    – Ramhound
    yesterday













  • Possible duplicate of: superuser.com/questions/648133/…

    – Ramhound
    yesterday


















2















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 :




  • http://localhost/

  • http://[::1]/


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://imgur.com/a/okB3ofG)

  • 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 ?










share|improve this question

























  • Possible duplicate of Chromium not checking hosts file

    – Ramhound
    yesterday











  • Why did you remove default 127.0.0.1 localhost from your hosts file? The duplicate is still accurate, Chrome doesn’t support the IPv6 address your using. Add 127.0.0.1 mydomain.local to the hosts file and it should work after a DNS flush.

    – Ramhound
    yesterday













  • I have not removed the entry you mentioned, that line is commented by default. Chrome does support IPv6 since it loads my Apache server at http://[::1]/ To your edit: That has already been tried and mentioned above in the post, still unsuccessful

    – Rezrazi
    yesterday













  • It’s way to early, some reason, I remember those lines being not commented. I can’t find a similar question that was asked recently, if ended up being the TLD, they changed it and it suddenly worked. However, your hosts file doesn’t mention trying the 127.0.0.1 entry.

    – Ramhound
    yesterday













  • Possible duplicate of: superuser.com/questions/648133/…

    – Ramhound
    yesterday














2












2








2








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 :




  • http://localhost/

  • http://[::1]/


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://imgur.com/a/okB3ofG)

  • 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 ?










share|improve this question
















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 :




  • http://localhost/

  • http://[::1]/


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://imgur.com/a/okB3ofG)

  • 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 ?







networking google-chrome dns hosts






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday







Rezrazi

















asked yesterday









RezraziRezrazi

8510




8510













  • Possible duplicate of Chromium not checking hosts file

    – Ramhound
    yesterday











  • Why did you remove default 127.0.0.1 localhost from your hosts file? The duplicate is still accurate, Chrome doesn’t support the IPv6 address your using. Add 127.0.0.1 mydomain.local to the hosts file and it should work after a DNS flush.

    – Ramhound
    yesterday













  • I have not removed the entry you mentioned, that line is commented by default. Chrome does support IPv6 since it loads my Apache server at http://[::1]/ To your edit: That has already been tried and mentioned above in the post, still unsuccessful

    – Rezrazi
    yesterday













  • It’s way to early, some reason, I remember those lines being not commented. I can’t find a similar question that was asked recently, if ended up being the TLD, they changed it and it suddenly worked. However, your hosts file doesn’t mention trying the 127.0.0.1 entry.

    – Ramhound
    yesterday













  • Possible duplicate of: superuser.com/questions/648133/…

    – Ramhound
    yesterday



















  • Possible duplicate of Chromium not checking hosts file

    – Ramhound
    yesterday











  • Why did you remove default 127.0.0.1 localhost from your hosts file? The duplicate is still accurate, Chrome doesn’t support the IPv6 address your using. Add 127.0.0.1 mydomain.local to the hosts file and it should work after a DNS flush.

    – Ramhound
    yesterday













  • I have not removed the entry you mentioned, that line is commented by default. Chrome does support IPv6 since it loads my Apache server at http://[::1]/ To your edit: That has already been tried and mentioned above in the post, still unsuccessful

    – Rezrazi
    yesterday













  • It’s way to early, some reason, I remember those lines being not commented. I can’t find a similar question that was asked recently, if ended up being the TLD, they changed it and it suddenly worked. However, your hosts file doesn’t mention trying the 127.0.0.1 entry.

    – Ramhound
    yesterday













  • Possible duplicate of: superuser.com/questions/648133/…

    – Ramhound
    yesterday

















Possible duplicate of Chromium not checking hosts file

– Ramhound
yesterday





Possible duplicate of Chromium not checking hosts file

– Ramhound
yesterday













Why did you remove default 127.0.0.1 localhost from your hosts file? The duplicate is still accurate, Chrome doesn’t support the IPv6 address your using. Add 127.0.0.1 mydomain.local to the hosts file and it should work after a DNS flush.

– Ramhound
yesterday







Why did you remove default 127.0.0.1 localhost from your hosts file? The duplicate is still accurate, Chrome doesn’t support the IPv6 address your using. Add 127.0.0.1 mydomain.local to the hosts file and it should work after a DNS flush.

– Ramhound
yesterday















I have not removed the entry you mentioned, that line is commented by default. Chrome does support IPv6 since it loads my Apache server at http://[::1]/ To your edit: That has already been tried and mentioned above in the post, still unsuccessful

– Rezrazi
yesterday







I have not removed the entry you mentioned, that line is commented by default. Chrome does support IPv6 since it loads my Apache server at http://[::1]/ To your edit: That has already been tried and mentioned above in the post, still unsuccessful

– Rezrazi
yesterday















It’s way to early, some reason, I remember those lines being not commented. I can’t find a similar question that was asked recently, if ended up being the TLD, they changed it and it suddenly worked. However, your hosts file doesn’t mention trying the 127.0.0.1 entry.

– Ramhound
yesterday







It’s way to early, some reason, I remember those lines being not commented. I can’t find a similar question that was asked recently, if ended up being the TLD, they changed it and it suddenly worked. However, your hosts file doesn’t mention trying the 127.0.0.1 entry.

– Ramhound
yesterday















Possible duplicate of: superuser.com/questions/648133/…

– Ramhound
yesterday





Possible duplicate of: superuser.com/questions/648133/…

– Ramhound
yesterday










1 Answer
1






active

oldest

votes


















0














I figured out how to "fix" that, posting it here for future readers.



How did I fix it ?



How did I get Chrome to actually point a host name to localhost ? Actually it's some funky behavior here. Simply by changing the TLD I'm using to .localhost

From Chromium's guidelines, and since the introduction of .dev as a legit TLD, there are some reserved TLDs.




To safely satisfy these needs, four domain names are reserved as listed and described below.

- .test

- .example

- .invalid

- .localhost



".test" is recommended for use in testing of current or new DNS related code.

".example" is recommended for use in documentation or as examples.

".invalid" is intended for use in online construction of domain names that are sure to be invalid and which it is obvious at a glance are invalid.

The ".localhost" TLD has traditionally been statically defined in host DNS implementations as having an A record pointing to the loop back IP address and is reserved for such use. Any other use would conflict with widely deployed code which assumes this use.




Read more here



Yet Chrome didn't point to localhost when I tried using .test it is just ... weird, it should've worked. If anyone has any input on this, please be my guest.
Beware Although this solution worked on my system, it is believed to cause some unexpected behavior on OSX systems.



As of this answer, on Chrome 74, it not possible to disable Chrome's own DNS host resolver, and aside those TLDs, all hosts entries will be ignored






share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1429515%2fchrome-on-windows-not-honoring-hosts-file-yet-other-browsers-do%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I figured out how to "fix" that, posting it here for future readers.



    How did I fix it ?



    How did I get Chrome to actually point a host name to localhost ? Actually it's some funky behavior here. Simply by changing the TLD I'm using to .localhost

    From Chromium's guidelines, and since the introduction of .dev as a legit TLD, there are some reserved TLDs.




    To safely satisfy these needs, four domain names are reserved as listed and described below.

    - .test

    - .example

    - .invalid

    - .localhost



    ".test" is recommended for use in testing of current or new DNS related code.

    ".example" is recommended for use in documentation or as examples.

    ".invalid" is intended for use in online construction of domain names that are sure to be invalid and which it is obvious at a glance are invalid.

    The ".localhost" TLD has traditionally been statically defined in host DNS implementations as having an A record pointing to the loop back IP address and is reserved for such use. Any other use would conflict with widely deployed code which assumes this use.




    Read more here



    Yet Chrome didn't point to localhost when I tried using .test it is just ... weird, it should've worked. If anyone has any input on this, please be my guest.
    Beware Although this solution worked on my system, it is believed to cause some unexpected behavior on OSX systems.



    As of this answer, on Chrome 74, it not possible to disable Chrome's own DNS host resolver, and aside those TLDs, all hosts entries will be ignored






    share|improve this answer




























      0














      I figured out how to "fix" that, posting it here for future readers.



      How did I fix it ?



      How did I get Chrome to actually point a host name to localhost ? Actually it's some funky behavior here. Simply by changing the TLD I'm using to .localhost

      From Chromium's guidelines, and since the introduction of .dev as a legit TLD, there are some reserved TLDs.




      To safely satisfy these needs, four domain names are reserved as listed and described below.

      - .test

      - .example

      - .invalid

      - .localhost



      ".test" is recommended for use in testing of current or new DNS related code.

      ".example" is recommended for use in documentation or as examples.

      ".invalid" is intended for use in online construction of domain names that are sure to be invalid and which it is obvious at a glance are invalid.

      The ".localhost" TLD has traditionally been statically defined in host DNS implementations as having an A record pointing to the loop back IP address and is reserved for such use. Any other use would conflict with widely deployed code which assumes this use.




      Read more here



      Yet Chrome didn't point to localhost when I tried using .test it is just ... weird, it should've worked. If anyone has any input on this, please be my guest.
      Beware Although this solution worked on my system, it is believed to cause some unexpected behavior on OSX systems.



      As of this answer, on Chrome 74, it not possible to disable Chrome's own DNS host resolver, and aside those TLDs, all hosts entries will be ignored






      share|improve this answer


























        0












        0








        0







        I figured out how to "fix" that, posting it here for future readers.



        How did I fix it ?



        How did I get Chrome to actually point a host name to localhost ? Actually it's some funky behavior here. Simply by changing the TLD I'm using to .localhost

        From Chromium's guidelines, and since the introduction of .dev as a legit TLD, there are some reserved TLDs.




        To safely satisfy these needs, four domain names are reserved as listed and described below.

        - .test

        - .example

        - .invalid

        - .localhost



        ".test" is recommended for use in testing of current or new DNS related code.

        ".example" is recommended for use in documentation or as examples.

        ".invalid" is intended for use in online construction of domain names that are sure to be invalid and which it is obvious at a glance are invalid.

        The ".localhost" TLD has traditionally been statically defined in host DNS implementations as having an A record pointing to the loop back IP address and is reserved for such use. Any other use would conflict with widely deployed code which assumes this use.




        Read more here



        Yet Chrome didn't point to localhost when I tried using .test it is just ... weird, it should've worked. If anyone has any input on this, please be my guest.
        Beware Although this solution worked on my system, it is believed to cause some unexpected behavior on OSX systems.



        As of this answer, on Chrome 74, it not possible to disable Chrome's own DNS host resolver, and aside those TLDs, all hosts entries will be ignored






        share|improve this answer













        I figured out how to "fix" that, posting it here for future readers.



        How did I fix it ?



        How did I get Chrome to actually point a host name to localhost ? Actually it's some funky behavior here. Simply by changing the TLD I'm using to .localhost

        From Chromium's guidelines, and since the introduction of .dev as a legit TLD, there are some reserved TLDs.




        To safely satisfy these needs, four domain names are reserved as listed and described below.

        - .test

        - .example

        - .invalid

        - .localhost



        ".test" is recommended for use in testing of current or new DNS related code.

        ".example" is recommended for use in documentation or as examples.

        ".invalid" is intended for use in online construction of domain names that are sure to be invalid and which it is obvious at a glance are invalid.

        The ".localhost" TLD has traditionally been statically defined in host DNS implementations as having an A record pointing to the loop back IP address and is reserved for such use. Any other use would conflict with widely deployed code which assumes this use.




        Read more here



        Yet Chrome didn't point to localhost when I tried using .test it is just ... weird, it should've worked. If anyone has any input on this, please be my guest.
        Beware Although this solution worked on my system, it is believed to cause some unexpected behavior on OSX systems.



        As of this answer, on Chrome 74, it not possible to disable Chrome's own DNS host resolver, and aside those TLDs, all hosts entries will be ignored







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered yesterday









        RezraziRezrazi

        8510




        8510






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1429515%2fchrome-on-windows-not-honoring-hosts-file-yet-other-browsers-do%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

            VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

            Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...