How to Auto-Enable VPN on Public Wi-Fi with iOS Shortcuts
Public Wi-Fi is easy to find in Canada — whether you’re at the airport, a Starbucks, a hotel, or riding public transit. It’s convenient, but not always safe, which is why many Canadians turn to VPNs (Virtual Private Networks) to help protect themselves online.

The tricky part with VPNs is remembering to switch them on and off every time you change networks. With a few iOS Shortcuts and Automations, your iPhone can handle that for you — turning on your VPN whenever you join public Wi-Fi, and disabling it when you’re back on trusted networks.
Follow the steps below to set up a VPN Automation Shortcut on your iPhone or iPad. Just keep in mind that the Shortcuts app can’t directly detect specific Wi-Fi networks, so it relies on your device’s location (often tied to Wi-Fi) to trigger automations.
- Open Shortcuts: Go to Automation and tap Create Personal Automation.
- Choose Wi-Fi: Select Wi-Fi and pick the network to trigger your VPN.
- Add VPN action: Tap Add Action, search for Set VPN, and select it.
- Connect VPN: Choose Connect VPN to turn it on automatically.
- Test it: Join the Wi-Fi to make sure the automation works.
You can pre-enable this automation for several networks. For example, set individual automations for the cafes you visit the most, or the trains and buses you take most often. You can also set a reverse automation to disconnect your VPN when you come back to your trusted home Wi-Fi.
Some VPN apps, like Surfshark, already include an auto-connect option on iOS that kicks in whenever you join a Wi-Fi (or even Ethernet) network. If you use one of those, you might not need iOS automations at all. You can find some more info on that here.

Because running a VPN constantly can drain your battery, here are a few tips to help keep the impact as low as possible:
- Limit automations to risky networks: You don’t need your VPN running everywhere. Set it to kick in only on public Wi-Fi and keep it off at home or work.
- Use On-Demand VPN settings: Many services, like Surfshark, can automatically connect only on untrusted networks, which saves battery.
- Choose an efficient VPN: Some apps drain more power than others. Look for ones that support energy-friendly protocols like WireGuard.
- Cut background activity: To stretch battery life further, pair your VPN automation with Low Power Mode during long commutes or travel days.
Canada is full of free public Wi-Fi hotspots, but the security risks often get ignored. With a quick setup in iOS Shortcuts and Automations, you can build a simple “set it and forget it” system that automatically turns on your VPN at places like Starbucks, airports, hotels, or even on public transit.
Public Wi-Fi isn’t going anywhere—but with a little automation and a trusted VPN, you can stay safe wherever you connect. Surfshark plans start at just $2.79/month with 3 months free — sign up here.
Want to see more of our stories on Google?
P.S. Want to keep this site truly independent? Support us by buying us a beer, treating us to a coffee, or shopping through Amazon here. Links in this post are affiliate links, so we earn a tiny commission at no charge to you. Thanks for supporting independent Canadian media!