First, use a specific DNS. OpenDNS and GoogleDNS are good choices. I always use OpenDNS on all my devices. Go to
Use OpenDNS ...or since you're having trouble, bypass any DNS etirely by going to
Use OpenDNS
Follow the setup and hopefully the issue will be solved.
Next, install and use ClamXav or Avast! for Mac. Both are, and have always been, free. Use one or the other, not both, and once it's installed, run a complete scan. The problem may be on your machine, on your router, or even with your ISP, but these two steps (new DNS and a system scan) should make you much safer.