Deep Links, Universal Links & App Links
Open specific screens from URLs, emails and notifications using custom schemes, Android App Links and iOS Universal Links.
Intermediate · about 4 hours · difficulty 3/5
Learn first: Navigation Patterns
A deep link opens your app directly on a specific screen, such as myapp://orders/42 or https://shop.example.com/orders/42. Notifications, marketing emails, QR codes and password reset flows all depend on them.
Two kinds
- Custom URL schemes (
myapp://): easy to set up, but any app can claim the same scheme and they do not work as normal web links. - Verified HTTPS links: Android App Links and iOS Universal Links. You host a verification file on your domain (
assetlinks.jsonfor Android,apple-app-site-associationfor iOS) proving you own it. If the app is not installed, the link opens the website.
Handling links in the app
Map URL paths to routes. Expo Router does this automatically from your file structure; other stacks configure a linking table or route matcher. Handle both cold starts (app launched by the link) and warm starts (app already running).
Pitfalls
- Deep links bypass your normal flow, so the target screen must handle a logged-out user and missing data.
- Validate parameters; a link is untrusted input.
- Test links from outside the app (for example with
adb shell am startorxcrun simctl openurl).
Good enough to move on: a link from a note opens the right screen whether the app was closed or already open.
Key concepts
- Custom URL schemes
- Android App Links
- iOS Universal Links
- Domain verification files
- Cold vs warm start handling
- Testing links from the command line
- Deferred deep links: Links that survive app install
Mini project
Add deep linking to your notes app so notes://note/ID and an https link open the right note, redirecting to login first if needed.
Check yourself
Why are verified HTTPS links preferred over custom URL schemes for anything security-sensitive?
Free resources
- Expo: Linking overview (Expo)
- Android App Links (Android Developers)
- Supporting universal links (Apple)