Chrome localhost does not work Chrome localhost does not work google-chrome google-chrome

Chrome localhost does not work


Got the same issue after updating to the latest chrome version last night. I was getting a ERR_NAME_NOT_RESOLVED error only on google chrome for all of my virtual hosts. Here's how that looked.

Screen Shot-> DNS name not resolved error DNS name not resolved error

Here's the fix I made.

Clear up the google DNS cache by typing this in the Chrome browser

  • chrome://net-internals/#dns

Screenshot -> Flushing Chrome DNS cache Flushing Chrome DNS cache

  • You will see a button "Clear Host Cache". Press that DNS cachewill be flushed.

  • Keep this DNS window open. Now access the virtual host in the browserfor me it was http:/api.localhost. Once you do that you will see anew entry in the DNS window. for me it was "localhost." notice the period "." at the end of localhost that showed an error.

  • Last step is to simply add this entry as to your localhost file.

Your hosts file should be updated with an entry to resolve localhost. to 127.0.0.1:

# dont forget the trailing . !!!127.0.0.1 localhost.  

in the hosts file located at:

  • for linux : /etc/hosts
  • for windows : C:\Windows\System32\drivers\etc\hosts

Another solution for your case might be to ditch the .dev at the end of your local virtual host domain

This has to do with some new changes by google. ".dev" comes under google's TLD (In the corner of the internet where people care about DNS, there is a bit of an uproar at Google's application for over a hundred new top-level domains, including .dev)

Try this Use a domain name you own. Possibly using the full name like "localhost.dev.$yourdomain" could help you here depending on your setup.


With the 'chrome' I face the same issue because by mistake I comment out the 127.0.0.1 localhost from the host file, But 'Firefox' will work.

Just make sure your host file include 127.0.0.1 localhost


FIXINGTry contacting your system administrator.ERR_ICANN_NAME_COLLISION.

if you are using magento and getting such error

  • just go to you database and search for core_config_data
  • click on it then check your web store name
  • change the store name
  • restart your wamp and fixed.