Deep linking means a tapped link opens a particular screen inside an app, such as one product, instead of the app's home screen. Apps can claim their own scheme like myshop://, or claim normal https links on your website through Universal Links on iPhone and App Links on Android, which need a file on your site.
| Kind | Looks like | Proves you own it? |
|---|---|---|
| Custom URL scheme | myshop://product/42 | No |
| Universal Link (Apple) | https://shop.example/product/42 | Yes, via apple-app-site-association |
| Android App Link | https://shop.example/product/42 | Yes, via assetlinks.json |
Updated
If you run a website and an app, deep links let one address serve both: people with the app land on the right screen, everyone else sees the web page. The web half of that is two small JSON files on your domain. Fill in the form below to write both files, then copy them to your server.
Everything is built in your browser from what you type. Nothing is sent anywhere.
{
"applinks": {
"details": [
{
"appIDs": [
"ABCDE12345.com.example.shop"
],
"components": [
{
"/": "/account/*",
"exclude": true
},
{
"/": "/product/*"
},
{
"/": "/blog/*"
}
]
}
]
}
}[
{
"relation": [
"delegate_permission/common.handle_all_urls"
],
"target": {
"namespace": "android_app",
"package_name": "com.example.shop",
"sha256_cert_fingerprints": [
"14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5"
]
}
}
]| apple-app-site-association | assetlinks.json | |
|---|---|---|
| Address | /.well-known/apple-app-site-association | /.well-known/assetlinks.json |
| https required | Yes, valid certificate | Yes, even if the app links are http |
| Redirects allowed | No | No (no 301 or 302) |
| File name and type | No file extension | Served as application/json |
| App-side setting | Associated Domains: applinks:yourdomain | android:autoVerify="true" on an intent filter |
Goes inside the activity that should open. Replace the host with your own domain.
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="shop.example" />
</intent-filter>Run with a test device connected. A state of verified means the file was accepted.
adb shell pm set-app-links --package com.example.shop 0 all
adb shell pm verify-app-links --re-verify com.example.shop
adb shell pm get-app-links com.example.shop
Any app can register a custom scheme, so two apps may both claim the same one, and on Android plain deep links can trigger a chooser dialog. Verified links fix both problems: only the owner of the website can publish the file that names the app.
Verified links also fail gracefully, because they are real web addresses that already lead somewhere.
A normal deep link cannot survive an install: the store opens, the person installs, and the app starts on its home screen. Carrying the original destination through the install is called deferred deep linking, covered in its own guide.
Universal Links are one kind of deep link: Apple's version that uses ordinary https addresses and a file on your website to prove you own the domain. Apple calls custom URL schemes acceptable but strongly recommends Universal Links.
For a Universal Link, Apple says the system opens the address in the person's default web browser so your website can handle it. On Android a verified link is still an ordinary https address, so with no app installed the browser opens it. A custom scheme link has no web page to fall back to.
At https://yourdomain/.well-known/apple-app-site-association, with no file extension, a valid certificate and no redirects. Since iOS 14, devices fetch it through an Apple-run content delivery network rather than directly from your server.
Android's docs say App Links work on Android 6 and later, on devices that have Google services.
On Android 12 and newer, run adb shell pm verify-app-links --re-verify with your package name, wait a few minutes, then adb shell pm get-app-links to see whether the domain shows as verified.
Related: Deferred deep linking, Progressive web app guide, Mobile app testing checklist, App icon sizes.
Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.
We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.