27

This is my first time trying Chrome and I can't access localhost, 127.0.0.1 or any other local domain I have setup from within Chrome 29.0.1547.66. They all work fine in Firefox and Internet Explorer, and have for years.

Nothing happens at all in Chrome when I try to load one of these pages. Loading icon just spins indefinitely.

What's up with Chrome?

System: Windows 8
Server: Softaculous AMPPS 2.0

Additional troubleshooting performed with @50-3 in comments; comments have since been removed to free up space

  • Disabled same origin policy --disable-web-security
  • Tried accessing via 127.0.0.1:80, http://localhost:80
  • Server not yet configured to allow connection from network IP address
3
  • The answer on this SO Q&A stackoverflow.com/questions/30467573/… is what worked for me. You need to clear out Chrome's DNS cache through this internal Chrome URL - chrome://net-internals/#dns.
    – slm
    Apr 19, 2018 at 1:50
  • 2
    None of the solutions mentioned on this page worked for me. Jun 16, 2019 at 0:12
  • i had to return to default docker engine settings i.e "buildkit": true. and then localhost was back on chrome Mar 6, 2021 at 9:44

5 Answers 5

15

I finally found a solution to this. Go to chrome://flags and set "Built-in Asynchronous DNS" to "Disabled", then restart the browser.

This allows all local domains to be accessed. Looks like DNS was just choking up the issue.

7
  • 20
    This no longer works as of now because the mentioned flag is no longer available. Aug 25, 2015 at 11:55
  • 3
    @BullyWiiPlaza check chrome://net-internals/#dns because it seems 'Internal DNS client enabled' is set to false by default.
    – Alfabravo
    Sep 8, 2015 at 18:53
  • 3
    My Google Chrome V52 64-bit for Mac had similar problem but chrome://flags had no settings related to DNS. Being desperate I "Reset all settings to default". And then it worked :)
    – moshfiqur
    Aug 28, 2016 at 13:27
  • 1
    I did reset all to default. And now it works. +1
    – prashanth
    Aug 21, 2018 at 11:43
  • 1
    I think it has been renamed to chrome://flags/#enable-async-dns
    – Mathieu
    Mar 10, 2023 at 17:08
7

Plagiarizing from Louie Bertoncin's answer on Chrome: how to stop redirect from http:// to https://--

My problem came from having a .dev domain, which was apparently recently registered as a [generic top-level-domain] and put in a commit to Chrome Canary. I found this out from a recent post I came across as I searched for my problem.

If you have the same problem I do, it appears that the best solution is to change your domain to be something other than .dev. The article suggested .test with a potential solution of .localhost later down the road (via this proposal).

2
  • Yes ! Work for me changing .dev to .local
    – ramiromd
    Jan 5, 2018 at 14:06
  • Changing .dev to .test also works for me. Thanks a lot ! Jan 29, 2018 at 8:36
4

The solution is this one. Go to chrome Settings -> Advances settings -> Privacy

And uncheck all options except this: "Protect you and your device from dangerous sites"

Will work !

3
  • 1
    Doesn't work. Tried this on OSX w/ Chrome 65.0.3325.181.
    – slm
    Apr 19, 2018 at 1:43
  • 1
    I had the same problem and this was the solution. It's really annoying that something so simple (i.e. chrome blocking whatever you are trying to do) does not come with a warning from the browser itself. Massive bug. Google, please fix.
    – deps_stats
    Jun 2, 2021 at 1:47
  • 1
    Didn't solve my problem despite me thinking I had found the solution
    – testing_22
    Nov 8, 2021 at 21:12
2

@sparrow had the right answer for me, but it was buried in the comments. I am hoping this helps someone else. @EcomEvo mentioned going to chrome://flags and looking for the "Built-in Asynchronous DNS". Since his answer is old, that is no longer an option in Chrome. However, I just did what @sparrow did. Under "chrome://flags", I just chose "Reset all settings to default" and it started working again.

2
  • Failing in 2022. This means I can no longer use Chrome for web development work! Thank goodness for the Brave browser. Frustrating though. Jan 4, 2022 at 15:28
  • Don't solve in my case. Jun 23, 2022 at 4:56
0

This worked for me: suffix the port number

Problem with this URL: http://app.localhost/

Just add the Port number:

Problem solved: http://app.localhost:8000/

Port number will vary based on what you use, XAMPP, APACHE, NGINX, Homestead.

I use Homestead.

3
  • It woesn't work for me: default HTTP port 80 is automatically removed
    – Xenos
    Jul 23, 2019 at 14:30
  • This doesn't work for me either, I'm using http://app.localhost:3001/practice/jobs/2045 and it still fails with ERR_CONNECTION_REFUSED
    – adamc
    Feb 5, 2020 at 10:27
  • @admac, Please confirm your port number based on the software you are using.
    – MotsManish
    Feb 6, 2020 at 6:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .