Make sure you are connecting to your wifi network and reset network settings on iMac and PRAM and NVRAM and restart your iMac.