Linux – Does Chrome use a different DNS server from the OS

dnsgoogle-chromelinux

I'm running Chrome on Linux. I have local DNS to resolve *.myname.com into 127.0.0.2 (I type "host whatever.myname.com" or "host myname.com" and I see the correct address). However in Chrome when I type "myname.com" it is redirected to "www.myname.com" and solve the "real" website that I don't want.

Only when I type "test.myname.com", not "www.myname.com", Chrome correctly resolves it into 127.0.0.2. I guess Chrome is trying to do funky thing with www.anything.com and anything.com.

How to fix it?

PS: the local DNS I'm using is dnsmasq. If I explicitely put myname.com into /etc/hosts Chrome resolves it correctly into 127.0.0.2, but I can't use wildcard in /etc/hosts.

PPS: I can confirm at chrome://net-internals/#dns that Chrome correctly myname.com and www.myname.com into the real public IP.

Best Answer

In fact Chrome was using it own DNS client that talks with multiple DNS servers (the local DNS, the router DNS, the router DNS in IPv6). I go to chrome://flags and disable "Built-in Asynchronous DNS". Now it works.

Related Question