Mac cannot browse, ping works fine

OK, this helped:

  • Removing ALL wi-fi networks from "System preferences - Networking - Advanced"
  • Restarting the router again (weird since all other devices, smartphones and my windows laptop were working fine)

While an old question, it still appears at the top on Google, so it makes sense to add a new answer.

I found a helpful hint at this Apple discussion. In short, a rogue process could be holding a crazy number of TCP connections. In my case it was Kaspersky that was failing to connect to the update server but seemingly never releasing connections.

To check for this, run:

sudo lsof -n -i TCP

If there's a huge number of open connections (in the hundreds) this might be your issue. Try killing the process that is holding them and see if it helps. After killing Kaspersky (and, probably needlessly, restating WiFi) it all went back to normal for me.

How this affects some sites but not others is beyond me.


Lifting this answer verbatim from another SE site: https://apple.stackexchange.com/a/208796/163653

  • Go to System Preferences,choose network
  • Click "advanced", go to the "Hardware" tab, and click on "configure", choose "manually"
  • Click on mtu, change it to "custom" and set the mtu number to 1453 (I dont why but the number is something like a networking secret from ancient times)