

Stepping back, continuous connectivity is the goal you're trying to achieve when looking for fixes if your iMac keeps disconnecting from Wi-Fi. Avoid having sources of interference near your wireless devices - power cables, microwave ovens, cordless phones, etc. Restart your iMac and the Wi-Fi router.Also, make sure your router runs the latest available firmware - check the manufacturer's website. Try using Apple's recommended settings for configuring your router.

Check out the recommendations at the end.

Here is what you can try to solve your Wi-Fi connectivity issues on your iMac:
