Mac connects to anonymous wireless networks randomly

I have my own router and it has a strong signal full bars, but sometimes when I leave my macbook for a time and come back I notice that it connects other random anonymous wireless networks.

how can I disable it, so it only connects to my router?


  • Go to System Preferences > Network > Wifi
  • Click on Advanced
  • Remove the preferred networks from the list by using - button

enter image description here