Why Does My Wi-Fi Go Out on My MacBook Every Time I Close It?
As a power-saving feature, all MacBook computers go into sleep mode whenever you close the lid. The hard drive and monitor are powered off and all of your open programs are saved to memory. In addition to all of this, the MacBook disconnects from your Wi-Fi network. If you want to keep Wi-Fi active after closing the lid, you can use what is called closed clamshell mode. If the MacBook is not reconnecting to your Wi-Fi automatically when you turn it back on, you can fix that in System Preferences.
1 Closed Clamshell Mode
To keep a MacBook active after you close the lid, you need to attach it to an external mouse, keyboard and monitor. Once these are connected, plug in the MacBook's power adapter and connect it to a power source. When you close the lid, the external monitor will turn blue for a moment and will then show your desktop again. Wi-Fi remains active while the lid is closed.
2 Automatically Reconnect to Wi-Fi
To have your MacBook automatically connect to your Wi-Fi network every time you turn it on or bring it out of sleep mode, make sure it remembers networks you have already joined. To enable this option, launch System Preferences from the Apple menu. Click the "Network" icon and then click the "Wi-Fi" option in the left menu if it's not already highlighted. Click the "Advanced" button and then click the checkbox beside "Remember Networks This Computer Has Joined."