# Expo deep linking with Expo Router

> How deep links and deferred deep links work in an Expo app with Expo Router, what Expo Go can't do, how app.json, +native-intent and EAS signing fit together, and how Strait links open the right screen after install.

Source: https://straitlink.in/guides/expo-deep-linking/
Markdown: https://straitlink.in/guides/expo-deep-linking.md

- [Guides](https://straitlink.in/guides/)
- Expo

# 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](https://straitlink.in/ai/#prompt-react-native)

STEPS · 5

- [1How Expo handles links on its own](https://straitlink.in/guides/expo-deep-linking/#how-expo-handles-links-on-its-own)
- [2The setup in four moves](https://straitlink.in/guides/expo-deep-linking/#the-setup-in-four-moves)
- [3Routing the event](https://straitlink.in/guides/expo-deep-linking/#routing-the-event)
- [4EAS signing is the usual trap](https://straitlink.in/guides/expo-deep-linking/#eas-signing-is-the-usual-trap)
- [5What you get once it works](https://straitlink.in/guides/expo-deep-linking/#what-you-get-once-it-works)

**Step 1 of 5**How Expo handles links on its own

AT A GLANCE · EXPO

- Builds on : `@straitlink/react-native`

- Platforms : Android, iPhone

- Start in the docs : [Expo (Expo Router)](https://straitlink.in/docs/sdks/expo/)

- Free plan : 25,000 taps a month, no card

## 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 like `https://hilltop.strait.link/summer` sends 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/summer` means nothing to Expo Router, because `/summer` is 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](https://straitlink.in/docs/sdks/expo/) has every command; here is how the pieces relate.

- **The same SDK as bare React Native.** Install `@straitlink/react-native` plus AsyncStorage and the Play referrer helper with `npx expo install`, so their versions match your Expo SDK.

- **`app.json` declares 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 with `autoVerify` that claims `hilltop.strait.link`, and Associated Domains for the same host on iPhone. Prebuild writes them into the native projects.

- **`app/+native-intent.tsx` steps aside.** Expo Router would try to route `/summer` itself and show "Unmatched route". Returning `'/'` for your link domain lets the SDK's `onLink` callback do the routing instead, with the real destination path. If your screens live in `src/app/`, this file goes there too; Expo Router ignores an `app/` folder next to `src/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:android` or 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.

[Open the Expo docs](https://straitlink.in/docs/sdks/expo/)

Docs for this setup

## Where to go next for Expo

- [Expo (Expo Router) Every command, from app.json to EAS fingerprints](https://straitlink.in/docs/sdks/expo/)
- [React Native: receive links Map paths to screens, loading states](https://straitlink.in/docs/sdks/react-native/receive-links/)
- [React Native: test Deep links, deferred links from Google Play, analytics](https://straitlink.in/docs/sdks/react-native/test/)

Check your setup

## Free tools for the parts that usually break

- [Will it open my app? Simulate a tap from WhatsApp, Instagram or Chrome](https://straitlink.in/tools/will-it-open/)
- [assetlinks.json checker Is your Android App Links file right?](https://straitlink.in/tools/assetlinks-checker/)
- [AASA validator Is your apple-app-site-association file right?](https://straitlink.in/tools/aasa-validator/)
- [Troubleshooting When a link opens the browser instead of the app](https://straitlink.in/docs/troubleshooting/)

Other guides: [Next.js](https://straitlink.in/guides/nextjs-deep-linking/) · [FlutterFlow](https://straitlink.in/guides/flutterflow-deep-linking/) · [Capacitor and Ionic](https://straitlink.in/guides/capacitor-deep-linking/) · [Jetpack Compose (Kotlin)](https://straitlink.in/guides/jetpack-compose-deep-linking/) · [SwiftUI](https://straitlink.in/guides/swiftui-deep-linking/) · [Unity](https://straitlink.in/guides/unity-deep-linking/)

## Ship links that open your Expo app.

Free for 25,000 taps a month, no card. Every tap gets a trace you can read.

[Start free](https://app.straitlink.in/?signup=1) [Read the quick start](https://straitlink.in/docs/quick-start/)
