Wifi connected but safari not loading web pages
safari 7.1.7
mac os x 10.9.5
My computer was working perfectly fine last night but when I turned it on this morning safari wouldnt load anything. I checked my wifi and it said it was connected fine, did the diagnostic test thing and I still get notifications for new emails. When I open safari and try to go to a webpage the little blue loading block thing will start and get stuck and it will be just a plain white page. Sometimes after a while I will get the "cant establish a secure connection" page. After a very long time I managed to somehow got it to load chrome and downloaded that to see if it was just a safari problem. Chrome is running better, but still not as fast as my computer was last night. How do I fix this? I tried resetting and emptying cache but still nothing.
MacBook Pro with Retina display, OS X Mavericks (10.9.5)