Android Browser hostnames does not get resolved if domain name is not appended

user1110790 picture user1110790 · Dec 28, 2011 · Viewed 34.8k times · Source

I am trying open a site hosted on my localhost using machine name in an android browser. When I type in machine name on a desktop browser , it gets resolved, but in an android device I get webpage not available. Server has been configured to handle DNS correctly and we do not see any errors.Please help.

Thank you

Answer

Trevor Johns picture Trevor Johns · Dec 28, 2011

There's two things at play here...

1: How is your machine name getting resolved? There are several mechanisms for this.

Windows machines use a combination of NetBIOS/WINS/ActiveDirectory to discover other machines on the local network. (Linux/Mac machines can access this data SAMBA, assuming it's enabled.)

Macs use Bonjour/Zeroconf to find each other.

Some home routers (e.g. routers running Tomato) will add an entry to a local DNS server when a DHCP lease is granted, based on the machine name being reported.

Android doesn't have SAMBA or Zeroconf services installed, so we have to rely on what's provided by your DNS server.

2: Assuming your DNS server automatically updates itself to reflect DHCP leases, there is a known issue where Android devices don't use the DNS search path provided by DHCP. As a result, only fully qualified doman names are resolved.

Here's the bug report: http://code.google.com/p/android/issues/detail?id=8030

As a workaround, try to find the FQDN for the devices you're trying to access.