I've setup my WiFi connection on my Galaxy S7 to use a custom DNS server. My PC runs a DNS server at and serves a few A records:


When I run tracert on my PC ( it correctly resolves home.local, shed.local and *.shed.local.

Using PingTools I ran tracert on my phone. home.local and shed.local both resolve correctly to their respective addresses.

However the *.shed.local yields:

Unknown host

Is there some difference in implementations of DNS between Windows and Android?

1 Answer 1


Yes, you cannot specify wildcards in /etc/hosts in linux (and therefore Android). People in Linux world have moved on to dnsmasq, I'm not sure what is the equivalent on Android. You'll have to work around it (maybe use proxy or some other setup?)

  • I am using a custom DNS server. I was able to make it work by mimicking the results returned from my 3rd party domain name server. The reason that it works on Windows is that for some reason it accepts a wildcard answer from the DNS server (whereas the hosts file also doesn't allow wildcards on Windows). To make it work on Android I had replace the single wildcard answer with a virtual CNAME record (based on the requested domain) pointing to an A record which I add as a second answer. This record points to the actual IP.
    – Ropstah
    Dec 27, 2017 at 12:06

You must log in to answer this question.

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