Well it could be so many things. Possibly by using the google dns the wifi ping to test for connectivity started working (pings
Microsoft Corporation: Software, Smartphones, Online, Games, Cloud Computing, IT Business Technology, Downloads or something, I don't know for sure). But then after that if the WiFi hotspot you are using has any other sort of filtering on it it could cause all kinds of other issues :/
If you can "ping www.microsoft.com" or "ping www.google.com", then your net connection (and DNS) are ok. But routers or ISPs can block anything they want to based on destination or source as they see fit :/
I assume that your signal strength is good? A signal strength of 2 bars or less can be iffy any time, coming and going minute by minute...