I’ve come across numerous discussions about connecting to public Wi-Fi networks on macOS, particularly those that require login or confirmation before access (which is common in places like coffee shops, airports, and hotels). I have personally faced this issue, and after much frustration, I found a solution that has consistently worked for me.
Solution
Open Terminal and run the following command:
open -a "Captive Network Assistant"
Or, if you’re unfamiliar with using Terminal, you can access Captive Network Assistant via Finder:
- In Finder, press
Shift+Command+Gon your keyboard. - Paste:
/System/Library/CoreServices/Captive Network Assistant.app/Contents/MacOS - Double-click Captive Network Assistant. If it doesn’t open, right-click the app, choose Show Package Contents, then open Contents → MacOS and double-click the binary file.
Why This Works
Captive portals depend on macOS detecting “limited internet” and auto-launching Captive Network Assistant. The Terminal command triggers that helper on demand, bypassing DNS/VPN/redirect quirks that prevent the automatic check from firing.
Alternative Solutions
If the portal still doesn’t appear after launching Captive Network Assistant, try one of these other methods.
Safari
- Go to captive.apple.com
Manually Retrieve the Captive Portal URL
- Open Terminal and run:
curl -I http://captive.apple.com
- Copy the
LocationURL and open it in Safari.
Remove Custom DNS
- System Settings → Wi-Fi → Details (for the network) → DNS
- Delete custom servers.
Flush DNS Cache
- Open Terminal and run:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Temporarily Disable Private Wi-Fi Address
- System Settings → Wi-Fi → Details
- Set Private Wi-Fi Address to Off.
Forget and Rejoin the Network
- System Settings → Wi-Fi → Details
- Forget This Network
- Reconnect.
Restart Wi-Fi
- Turn Wi-Fi off and on again (and, if needed, reboot your router).