# Deep links plugin

Source: https://saastostore.com/plugins/deep-links

With this plugin, links to your domain open your app instead of the browser, on the right page. It's what makes a link in an email or a message land on the exact screen people expect.

## When to use it

- Order, delivery or booking emails that link to a page
- Magic sign-in links that should come back to the app
- Shared links to a product, an article or a profile

## Set it up

1. **Add the plugin** In your project's plugin library, add Deep links, then launch a new build.
2. **Host two small files on your site** `assetlinks.json` for Android and `apple-app-site-association` for iOS. Your project page gives you both, filled in.
3. **Check them** Enter your domain in the [deep link validator](https://saastostore.com/tools/deep-link-validator).
4. **Test on a phone** Tap a link from a notes app or a message. Typing it in a browser doesn't count.

[Deep links](https://saastostore.com/docs/deep-links) has the exact file formats, where to put them on each platform, and how to test.

## No code needed

Nothing to change in your site's code. The app opens the address of the link, and your site shows that page as usual. If you want to move to a page from your own code, use `navigateTo`:

```js
window.saastostore?.navigateTo?.("/orders/42");
```

> On iOS, deep links need native navigation (Shell V2). A full-screen iOS app doesn't handle them.

## Frequently asked questions

### Do deep links work on the Android Build (Web)?

That build opens your site in Chrome, and the assetlinks.json file already links your domain to the app. The plugin itself is for the Native build.

### What if the app isn't installed?

The link opens your website in the browser, as usual.

### Why do links stop working after publishing on Google Play?

Google Play re-signs your app. Add the SHA-256 of the app signing key to assetlinks.json, next to the existing one.

### Can I limit which pages open in the app?

Yes, on iOS through the paths in apple-app-site-association. On Android, all pages of the domain open in the app.
