As far as I am aware, Android checks internet connectivity by connecting to connectivitycheck.android.com.

On one of the WiFi networks I regularly connect to, they use web filtering, and block the android website. This means I can use the internet, but when I move around the campus and my device has to connect to the next access point automatically (with the same SSID etc.), it refuses, as it could not previously get an internet connection. Provided I am rooted, can I change this server to, say, www.google.co.uk?

I am running Cyanogen Mod 12.1 on a C1905.

P.S. There is very little chance that I can get these guys to unblock the android website. :(

  • Just to be clear, a failed connectivity check is when you connect to WiFi but the ! symbol appears on the WiFi icon on your notification bar
    – User
    Jan 22, 2016 at 8:09
  • Technically, sure... Just add an entry in /system/etc/hosts file and reboot, but I'm not sure what it does to check connectivity, a simple ping or something more, redirecting it could cause it to fail on every network everytime. Remember if you flash nightly updates this will likely be written over each time.
    – acejavelin
    Jan 27, 2016 at 12:05
  • In this case you can use some sort of proxy tunnel apps like psiphon, troidVPN, tunel guru etc.
    – Vivek Ji
    Jun 11, 2016 at 3:33

1 Answer 1


Just execute su then settings put global captive_portal_server SERVER_YOU_WANT_TO_USE in a terminal emulator app or ADB shell. I'm in China so I do this for every device I own when I set them up (i.e. clean flash - this persists through dirty flashing), and I use g.cn (shorthand for Google.cn). Google.com.hk should have the same function though I can't be sure.

I wonder why this didn't get a proper answer for this long...

  • Thanks! I too wonder why this went unanswered for so long. Is it just a ping it does? Or does it look for certain data?
    – User
    Aug 15, 2016 at 20:44
  • 1
    It tries to reach a certain address for a "captive portal". More explanation in this question and its answers/comments: link
    – Andy Yan
    Aug 15, 2016 at 23:42
  • This requires root?
    – Nimrod
    Apr 21, 2018 at 21:35
  • @Nimrod Doesn't seem so at least on my device, not sure if that applies universally.
    – Andy Yan
    Apr 22, 2018 at 0:36

You must log in to answer this question.

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