We have a WiFi hotspot setup with no internet. A website has been hosted locally on a server connected to the same hotspot. Necessary DNS entries have been made in the Access Point to ensure the DNS query for a particular web address (say http://www.facebook.com) resolves to ip address of the server. Users are expected to access only single website (facebook.com) on the WiFi which is hosted on the server. Some users that have cellular data turned on connect to the WiFi hotspot. These users when they enter web address (facebook.com), instead of the phone using the WiFi connection to get to the locally hosted website, the phone turns to cellular data and opens the website hosted locally.

Any clues why could this is be happening?

Is it because the user previously access the web address on internet and the ip address was cached by the browser. And now when the user enters the same url in their browser when connected our WiFi, the browser directly queries the router for the IP address. And since there is no internet on our WiFi, the phone automatically switches to cellular data.

  • When internet connection is not detected in wifi, cellular network is used. In order to access LAN websites you would require to turn off cellular network. Mar 23, 2015 at 12:23
  • How can i fool android into thinking there is internet available on WiFi as well. I mean, how does android know whether the WiFi has internet or not?
    – Kartik
    Mar 23, 2015 at 12:30

2 Answers 2


Have you tried opening sites which are not locally hosted via the same hotspot? I think having the site hosted on the same hotspot as that of the phone's wifi might be giving such a problem. May be an IP conflict or something else like that.


It does sound like the device is using a DNS Cache to cause such an error (you've alluded to this yourself) I'm not aware of an option to flush dns cache on android, short of a good old fashioned reboot. Some suggest clearing browser cache , and switching wifi on and off to force a flush, however a reboot is surefire.

  • Well i cannot ask my users to reboot everytime they connect to my WiFi. What if i set TTL in my DNS provider (godaddy) to a much smaller value (0 is it allows). That way not client will ever cache the dns entry. Do you think it will work?
    – Kartik
    Mar 23, 2015 at 20:00

You must log in to answer this question.

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