I've been having an intermittent issue recently on my MacBook Pro: every so often, I'll start getting bad DNS results. For example: I type in facebook.com, and another website loads up instead of Facebook. If I clear the DNS cache with dscacheutil -flushcache, the problem is instantly fixed, but that doesn't stop it from happening again, of course. This happens with OpenDNS, Google's DNS, and my ISP's DNS, so it's definitely not the DNS server. I am at a loss trying to figure out what might be happening. Any ideas?


The question remains unsolved of where do these bad DNS entries come from in the first place. If this was not a Mac, I would have advised a virus scan. But in any case, I would check any extensions currently installed in your browser, or try Safe mode (without extensions), or try another browser.

Another possibility might be that your router is caching the bad DNS. Check if there is any setting for turning this off, or a firmware update. It might also help to know which model is the router and its firmware version.

This blog could also maybe be of help : Clear DNS Cache on your router.

With your router's exact make, I was able to find WRT160N V3 has serious DNS issues.
It seems you are not alone. It says :

I've just configured the TCP/IP on my PC to not automatically obtain DNS server addresses, instead I put in my ISP's servers manually.

Everything has been absolutely trouble-free since I manually took the router address out of my DNS server list two days ago. I'm satisfied that the DNS proxy dis-service that is built into the WRT160N v3 is entirely responsible for the screwy DNS issues described above.