23

I have defined some virtual servers that until the last days were working fine.

Now they don't on Chrome, but there are no problems in firefox or safary.

I get this:

This webpage is not available

ERR_ICANN_NAME_COLLISION

Hide details

This site is using a new generic top-level domain (gTLD). If you have used loc.dev to access an internal site in the past, contact your network administrator.

I found as a solution:

Set the "Built-in Asynchronous DNS" to "Disabled" in chrome://flags, but the is no such flag in my chrome version ( 43.0.2357.81 )

Do you know a solution for this?

LE : If i move the site on the htdocs file and i go on the url http://localhost, it works. It seems that it has a problem only with virtualhosts.

0

7 Answers 7

19

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 cache will be flushed.

  • Keep this DNS window open. Now access the virtual host in the browser for me it was http:/api.localhost. Once you do that you will see a new 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.

13
  • @user3429655. Thanks for your reply I tried this.Here what i still get: loc.dev IPV4 error: -166 (ERR_ICANN_NAME_COLLISION) 2015-05-27 11:07:05.272 [Expired] My virtualhost: <VirtualHost *:80> DocumentRoot "D:/work/claudiu/loc/site" ServerName loc.dev ServerAlias www.loc.dev <Directory "D:/work/claudiu/loc/site"> AllowOverride All Require all Granted </Directory> </VirtualHost> My hosts file : 127.0.0.1 localhost. 127.0.0.1 loc.dev. I restrated the xampp server. May 27, 2015 at 8:07
  • whats the host name at the DNS flush screen -> chrome://net-internals/#dns when you access the virtual host link after flushing it www.loc.dev
    – Tariq Khan
    May 27, 2015 at 8:11
  • www.loc.dev IPV4 error: -166 (ERR_ICANN_NAME_COLLISION) 2015-05-27 11:12:23.619 [Expired] May 27, 2015 at 8:13
  • okay then add this in your hosts file 127.0.0.1 www.loc.dev
    – Tariq Khan
    May 27, 2015 at 8:14
  • It has the same result. May 27, 2015 at 8:18
3

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
1

Worked for me: chrome://net-internals/#hsts -> Domain Security Policy -> Delete domain security policies -> enter there localhost and press delete

0

Here is another catch for you, my virtual hosts in Windows hosts file were defined as:

127.0.0.1 bla.bla.bla.localhost
127.0.0.1 bla2.bla2.localhost

And actual server virtual host directives in Xamp Apache Vhosts file made it all work nicely in all browsers, but Chrome!

A simple fix - dont end with full "locahost" word, rename the vhosts to end with anything else, just "loc" did it in my case, all works in Chrome now!

0

FIXING Try 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.
0

Been having this problem with Version 56.0.2924.87 (64-bit) of chrome, attempting to access a vm by gset.localhost, just would not work.

Changed the url in the hosts file to gset.loc and it works fine.

The answer seems to be do not use localhost in your hosts file urls when attempting to access a virtual machine running on your machine using chrome.

1
  • Some sample lines of your hosts file would be fine for OP to understand better.
    – Purus
    Feb 23, 2017 at 12:10
-2

All browsers - chrome, firefox, safari were not resolving my virtual host and kept re-directing to www.mysite.dev After pulling my hair for hours - it turned out I just need to change mysite.dev to www.mysite.dev in the /etc/hosts file.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.