Skip to Content
Sindre Sorhus
Back to Online Check

Updated

How to Restart Wi-Fi Automatically When the Internet Drops on Mac

By Sindre Sorhus, who makes the Online Check app

When the Wi-Fi of a Mac stops working, turning it off and on again often fixes it.

With Online Check

  1. Open Online Check. Its icon is in the menu bar.
  2. Add the shortcut that restarts the Wi-Fi to the Shortcuts app.
  3. Open the settings of Online Check, and click “Advanced”.
  4. In “Run shortcut on status change”, click the button, and choose the shortcut.

Online Check checks the real internet connection, not only the Wi-Fi, so it notices when the Wi-Fi is connected but nothing loads. How it checks.

Tips

  • To join another Wi-Fi network when the current one is offline, use the shortcut that connects to another Wi-Fi, and type the name of the network in it.
  • To make your own shortcut, use an “If” action on the “Shortcut Input”: it is false when the Mac goes offline, and true when it is online again.
  • To see when and how often the internet drops, choose “History…” in the menu of Online Check. How to see when your internet drops.

Get Online Check

Online status in your menu bar

Download on the App Store

$5, one-time purchase

Requires
macOS 26 or later
Family Sharing
Yes
Updated
May 2026

More about Online Check

Without an app

macOS does not restart the Wi-Fi when the internet drops. Do it by hand: click Control Center in the menu bar, click Wi-Fi to turn it off, and click it again to turn it on.

In the Terminal app, these commands do the same (on most Macs, the Wi-Fi is en0):

Terminal
networksetup -setairportpower en0 off
networksetup -setairportpower en0 on

A Shortcuts automation with the “Wi-Fi” trigger runs when the Mac joins or leaves a network, not when the internet stops working, so it cannot do this. Apple