WIFI connection with question mark My android phone connected with WiFi shows full signal. Whereas question mark appears on the signal mark and I'm unable to connect to the internet.

Can anyone give me a solution to reconnect my internet? So far I have not faced these problems.
I suspect this scenario is caused lack of internet connectivity with respect to the wi-fi access point.  In other words the device is properly connected to the Wi-Fi connection but the internet connectivity might be down due to one or a few cases.

This issue can be attributed to one or more issues:


DNS resolving problem with your Internet service provider (ISP) or router.


It could mean that the route to your DNS addresses/servers is inaccessible at the given moment, so the problem is with your service provider and not your phone. 

Misconfigured DHCP/DNS settings


The normally results in the DNS server  not responding to connection attempts. In addition faulty DCHP settings may cause the device to having difficulties  getting IP Address assigned by the DCHP server.

Problems connecting to Google servers (captive portal server)


According to this post, 




  Android tries to reach a file named generate_204 on one of the
  Google servers and if there is no positive response, it means that
  there is no connection to the internet, and notification is generated


Also highlighted in the above discussion, the  detection url differs between different Android versions.


  
  clients3.google.com/generate_204 check (kitkat)
  connectivitycheck.gstatic.com/generate_204 (marshmallow)
  




Possible fixes:


Change DNS address of router/modem


Check DNS settings for both your router and your phone. Try to manually set DNS servers to Google's public DNS servers 8.8.8.8 and/or 8.8.4.4.






Rebooting device (with SIM card removed)


You can try rebooting the device a proceedure similar to "clean boot" on PCs by following the proceedure:


Toggle Airplane mode On/Off.
Power off your phone ➡ Remove your SIM card ➡ Turn on your phone ➡ Power off your phone ➡ Re-insert your SIM card➡ Boot your phone.





Bypassing wi-fi check during initialisation (new user creation).


One user was able to bypass this issue, creating a new user to bypass the connectivity check during initialisation. Here is their proceedure:


  
  Reboot phone and wait until wi-fi is connected
  Go to Settings and create a new user
  Continue with user setup until you see "checking connection"
  As soon as you see "checking connection", switch off your phone
  Switch on your phone again 
  Toggle wi-fi, and the exclamation mark should disappear quickly
  
  You may optionally remove the new user you just created
  




The following methods need root:


Changing captive portal server 


Install a terminal app alternatively these  commands can also be run via the adb shell.
Open the terminal app and run su. 
Run settings get global captive_portal_server. This will show the current captive portal server. A "null" reply is usually the default.
Run settings put global captive_portal_server YOUR_SERVER_ADDRESS. You can  add google.com as the captive portal server, i.e settings put global captive_portal_server google.com.
Run exit once to exit from su, then exit one more time to close the terminal.
Reboot the Android device. Will not work without a reboot.






Disabling captive portal 



  
  Since the culprit is a method isCaptivePortal() which access clients3.google.com/generate_204 to test if a connection is deemed
  "usable". The page, as its name suggest, is designed to always return
  a HTTP 204 status code. Based on this you have a couple options:
  


i. Kill isCaptivePortal() completely


with adb set, run adb shell su -c "settings put global captive_portal_detection_enabled 0"


Note:  The down side is that isCaptivePortal() is actually useful to detect for example when a WiFi network requires login. If the request to the 204 page gets redirected to a login page (not a 204), the system will understand and display the exclamation mark as intended.

ii. Change the target of isCaptivePortal()


another workaround is replacing the Google host with a host that is accessible within the specific region. This host should also be returning 204 every time /generate_204 is accessed.

i.e adb shell su -c "settings put global captive_portal_server {alternate_host} "




Other methods

Using hosts


You can edit hosts to block the captive portal detection url thus bypassing the sending of the requests to captive portal server.


References and acknowledgements


Mihai Neacsu (author):  How to fix Android Cellular data and Wi-Fi network connected and working but with exclamation points
Signal data exclamation mark!
How does WiFi in android detect if the device has to sign in or not?