Thank you, jeannelois. Your very simple solution fixed the situation. After changing DNS to 8.8.8.8 it took a few seconds and both Safari and Firefox starting loading all websites.
I have a MacBook Pro 10.6.8. On Oct. 24 2016, I noticed that Firefox wouldn't load any websites. Then, I found a message that indicated that my computer's date had been set to 2001. My laptop had ran out of power a couple of days ago, and when I restarted it, something switched the date. I reset the date correctly, and Google and Facebook started running again, but no other websites would load. I applied your solution and problem solved! Let's hope the fix lasts.