connectivitycheck.gstatic.com is listed in categories/dnsparsed (and implicitly re-blocked by the root gstatic.com entry in the same file).
Root cause
Since Android 5.0, NetworkMonitor (part of ConnectivityService in AOSP) validates internet access on every network change by issuing an HTTP GET to:
http://connectivitycheck.gstatic.com/generate_204
and expects a bare HTTP 204 response. This is not just captive-portal detection, it's Android's general connectivity validation probe. A successful 204 is what clears the "no internet" state on the network icon; a failed probe (NXDOMAIN, timeout, wrong status) makes Android mark the network as NOT_VALIDATED, which:
- shows the "no internet" / limited-connectivity icon even though the connection works fine,
- can make Android deprioritize or auto-disconnect from that Wi-Fi in favor of mobile data (or vice versa) due to
NetworkScorer/multi-network heuristics relying on validation state,
- breaks apps that check
ConnectivityManager validated-network status before doing work.
Blocking the domain at the DNS level (NXDOMAIN) makes the probe fail exactly like the network being genuinely offline: Android can't distinguish "domain blocked by my resolver" from "no real internet."
Tested on
- Redmi Note 13 Pro
- Redmi Note 14 Pro
- Redmi Note 14 Pro 5G
- Redmi Note 15 Pro 5G
All four devices (MIUI/HyperOS, so Google's AOSP NetworkMonitor logic is still present under the hood) showed the persistent "no internet" state on Wi-Fi and/or mobile data while the connection was fully functional, until connectivitycheck.gstatic.com was allowlisted.
Suggested fix
Remove connectivitycheck.gstatic.com from categories/dnsparsed (and from the generated pihole-google.txt/other output formats), or add it to a documented "required exceptions" list for Android users, similar to how NextDNS users are told to manually whitelist specific services when using the wildcard list.
connectivitycheck.gstatic.comis listed incategories/dnsparsed(and implicitly re-blocked by the rootgstatic.comentry in the same file).Root cause
Since Android 5.0,
NetworkMonitor(part ofConnectivityServicein AOSP) validates internet access on every network change by issuing an HTTP GET to:http://connectivitycheck.gstatic.com/generate_204
and expects a bare
HTTP 204response. This is not just captive-portal detection, it's Android's general connectivity validation probe. A successful 204 is what clears the "no internet" state on the network icon; a failed probe (NXDOMAIN, timeout, wrong status) makes Android mark the network asNOT_VALIDATED, which:NetworkScorer/multi-network heuristics relying on validation state,ConnectivityManagervalidated-network status before doing work.Blocking the domain at the DNS level (NXDOMAIN) makes the probe fail exactly like the network being genuinely offline: Android can't distinguish "domain blocked by my resolver" from "no real internet."
Tested on
All four devices (MIUI/HyperOS, so Google's AOSP NetworkMonitor logic is still present under the hood) showed the persistent "no internet" state on Wi-Fi and/or mobile data while the connection was fully functional, until
connectivitycheck.gstatic.comwas allowlisted.Suggested fix
Remove
connectivitycheck.gstatic.comfromcategories/dnsparsed(and from the generatedpihole-google.txt/other output formats), or add it to a documented "required exceptions" list for Android users, similar to how NextDNS users are told to manually whitelist specific services when using the wildcard list.