Internet is connected but connection alert keeps popping up
You said you had once installed MacKeeper on your mac so this resulted in installing a ton of Malware's on your Mac but don't worry you can easily get rid of all those Malware's

Download this Malware Cleaning Software https://www.malwarebytes.com it is a very popular malware cleaning software for effectively cleaning malware and it is even recommend by Apple (an Apple senior advisor over Apple chat support suggested this software to me! ) 

Until and unless you clean the malware from your mac those messages will keep popping no matter which website you visit cause it is installed on your mac not on the web in your case