Expo deep linking that survives the install
Expo Router already turns URLs into screens. What it can't do alone is open the right screen after someone installs from the store, or count which chat the tap came from. This guide adds both.
- Guide
- Android
- iPhone
@straitlink/react-native- Faster: one prompt
How Expo handles links on its own
Expo Router maps the path of an incoming URL to a file in app/. A link to yourapp://product/42 opens app/product/[id].tsx without any code, and expo-linking gives you the raw URL if you want it. That covers links you control end to end, inside one app.
Three things are missing for links you share in public:
- A link that works without the app.
yourapp://does nothing on a phone that doesn't have your app. A hosted link likehttps://hilltop.strait.link/summersends people without the app to Google Play or the App Store instead. - The screen after install. Store installs lose the URL. The SDK gets it back: on Android from the Play Install Referrer, which is exact; on iPhone from a short-lived device match, which is opt-in.
- Short links.
https://hilltop.strait.link/summermeans nothing to Expo Router, because/summeris a slug, not a screen. The SDK asks the link server for the destination and hands you its path.
The setup in four moves
The Expo page in the docs has every command; here is how the pieces relate.
- The same SDK as bare React Native. Install
@straitlink/react-nativeplus AsyncStorage and the Play referrer helper withnpx expo install, so their versions match your Expo SDK. app.jsondeclares the link domain. The SDK's config plugin,["@straitlink/react-native", { "domains": ["hilltop.strait.link"], "scheme": "yourapp" }], registers your custom scheme, an Android intent filter withautoVerifythat claimshilltop.strait.link, and Associated Domains for the same host on iPhone. Prebuild writes them into the native projects.app/+native-intent.tsxsteps aside. Expo Router would try to route/summeritself and show "Unmatched route". Returning'/'for your link domain lets the SDK'sonLinkcallback do the routing instead, with the real destination path. If your screens live insrc/app/, this file goes there too; Expo Router ignores anapp/folder next tosrc/app/.- A development build. Expo Go can't load the SDK's native module, and links on your domain open your app, not Expo Go.
npx expo run:androidor an EAS development build fixes both.
Routing the event
return links.onLink((e) => {
if (e.matched && e.path) router.push({ pathname: e.path, params: e.params } as Href);
});Wait for useRootNavigationState()?.key before subscribing. onLink replays past events, so the launch link isn't lost while the navigator mounts.
EAS signing is the usual trap
Android only opens an app directly for a verified domain, and verification checks the SHA-256 fingerprint of the certificate that signed the build on the phone. Local builds use the debug keystore, EAS builds use the keystore eas credentials shows, and Play Store installs use the Play App Signing key. Each one you install needs its fingerprint in Dashboard → Apps & stores. When links work from npx expo run:android but not from an EAS build, this is almost always why.
What you get once it works
Each tap shows up in the dashboard with its channel (WhatsApp, Instagram, SMS), whether it opened the app or went to the store, and whether that install opened the right screen. Taps that start inside Instagram or WhatsApp get a page with an Open in app button first, because those browsers often don't pass the normal hand-off to your app.
Docs for this setup
Where to go next for Expo
Check your setup
Free tools for the parts that usually break
Other guides: Next.js · FlutterFlow · Capacitor and Ionic · Jetpack Compose (Kotlin) · SwiftUI · Unity
Ship links that open your Expo app.
Free for 25,000 taps a month, no card. Every tap gets a trace you can read.