How to fix Android "Connected but no internet" with static IP?

I have set up a Pi-Hole, but my router doesn't allow setting it as global preferred DNS, so I have to set it for all my devices manually.

So I go to Android WiFi settings (Android 11), and set Static IP

  • My default assigned IP was 192.168.0.115, so I leave that as is
  • Default gateway was 192.168.1.1, also left as is
  • DNS 1 I changed to my PiHole IP (which works from my desktop)
  • DNS 2 left blank

I get "Connected but no internet" status, even if I change DNS 1 to Google (8.8.8.8) or Cloudfare (1.0.0.1). Turning on/off cellular data doesn't help either.

What could be causing this? How can I set custom DNS server when connected to this network?


Your network settings seem strange. The default gateway must be on the same subnet as the IP address - in typical home setups, the subnet mask is /24 and so the third octets of the IP addresses should be identical. You don't mention what you have the subnet set to, and you have 0 for the third octet of the IP address and 1 for that of the gateway. Are you sure that's correct?