Launch offer: the first 1,000 users get Business free. Claim your spot →
All posts
Deep linkingBy the directinapp team6 min read

How to open an iOS app from a web link

You want a web link to launch an iPhone app on the right screen, not bounce to Safari or a dead tab. On iOS there's really one correct way — and one that quietly fails. Here's both.

A person opening an app on their phone
Photo by Artem Beliaikin on Unsplash

To open an iOS app from a web link you use a Universal Link: a standard https URL your app has verified it owns via an apple-app-site-association file plus an Associated Domains entitlement. iOS then opens the app when it's installed and loads the web page when it isn't. The older custom-scheme approach (myapp://) still exists but fails silently from in-app browsers and has no fallback.


You want a tap on a web page to open your iPhone app on the exact right screen. On iOS the honest answer is short: use a Universal Link. The custom-scheme approach you'll find in old tutorials mostly doesn't work where it matters. Here's the right way and the trap.

The right way — a Universal Link

A Universal Link is just https://yourdomain.com/path that your app has claimed. Two steps: host an apple-app-site-association file on your domain listing your app ID and paths, and add an Associated Domains entitlement (applinks:yourdomain.com) to the app. iOS verifies the pair, then opens the app for those links when installed and loads the page when not. One link, correct fallback, no custom scheme.

The trap — custom schemes

myapp://path looks tempting because it's a one-liner. But iOS won't reliably fire it from inside another app's webview (Instagram, Gmail), and when the app isn't installed it resolves to nothing — no store, no page, no error. Fine as a private hook, wrong as the thing a stranger taps.

How to test it without pulling your hair out

Universal Links do not fire when you paste the URL into Safari's address bar — that path deliberately bypasses the app. Test by tapping a real link from Notes or Messages. If it opens Safari instead of the app, the usual cause is the association file: wrong content-type, a redirect, a missing app ID, or iOS hasn't re-fetched it since install.

If it’s not your app

You can't set up Universal Links for an app you don't own — you can't publish Instagram's or YouTube's association file. A routing layer like directinapp applies the correct iOS handoff for each destination and falls back to the web cleanly, in-app-browser cases included, with no entitlement or SDK on your side.

Found this useful? Tell Google to show you more of it.

Add us as a preferred source

Related guides

Put this into practice

Create smart short links that open the right app, with analytics built in. No credit card required.

Start free