1 min read

Create a public WiFi connection automation for iOS

Some public WiFi networks use a data capture or login portal before you can use them, and these don't always load automatically. This iOS shortcut can help.

Plenty of public WiFi networks are using a visitor captive portal that requires you to sign in before you get free internet access. Unfortunately I find that the pages often don’t automatically present themselves, therefore in order to easily get those pages I created an automaton. 

On iOS I used Shortcuts to create a very simple Home Screen icon that opens a web page. The page it opens is the page that Apple try and use in the background for this very purpose: http://captive.apple.com/

The Shortcut is super simple:

A screenshot of the settings to configure within the iOS Shortcuts app.
  1. Create a new Shortcut by tapping the + on the home of the Shortcuts app
  2. In the Search Actions box, type Open URL and then select the 'Open URLs' item
  3. In the actions editor, tap the placeholder URL text and enter http://captive.apple.com/
  4. To give the action a name, tap the temporary title at the top and select Rename - type the new name and then done on the keyboard
  5. Tap Done in the top-right corner to save the shortcut

Add this to the Home Screen using a Shortcuts widget and this will see you flying through captive portals (when they don’t show themselves). 

Why does this happen

Why not just browse to Google or another known site?

Most websites make use of secure connections over HTTPS, and to ensure this security will always direct your browsing to the secure protocol. The captive portal will try to intercept the request to a secured website, however it will fail because it’s performing behaviour that HTTPS is designed to prevent (MITM attacks). The captive.apple.com address above is served over insecure HTTP with no automatic redirect to HTTPS, thus meaning the captive portal can step in and offer up the login page.