It sounds like a problem with your DNS servers. The next time it goes out, try to access the following sites by their name and IP addresses:
https://testmy.net http://67.18.179.85
http://www.yahoo.com http://209.73.186.238
http://www.google.com http://64.233.161.104
If you can access them by their IP address and not their name, then something is wrong with your ISP's DNS servers...