What Is Deep Linking?
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.
Verification file generator
Everything is built in your browser from what you type. Nothing is sent anywhere.
Save as /.well-known/apple-app-site-association (no extension)
{
"applinks": {
"details": [
{
"appIDs": [
"ABCDE12345.com.example.shop"
],
"components": [
{
"/": "/account/*",
"exclude": true
},
{
"/": "/product/*"
},
{
"/": "/blog/*"
}
]
}
]
}
}Save as /.well-known/assetlinks.json
[
{
"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"
]
}
}
]Hosting rules for both files
| 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 |
Handling the link inside the app
Android intent filter for verified links
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>Checking verification on Android 12 or newer
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
Why verified links won
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.
Links before the app is installed
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.
How it works
- Decide which paths should open in the app, for example /product/* but not /account/*.
- Fill in your Apple team ID and bundle ID, and your Android package name and signing certificate fingerprint.
- Copy each generated file to the /.well-known/ folder of your website, served over https with no redirects.
- Add the matching setting in each app: the Associated Domains entitlement on iOS, an intent filter with android:autoVerify="true" on Android.
Tips
- Treat every incoming link as untrusted input. Apple warns that URL schemes are a potential attack vector, so check parameters and ignore malformed ones.
- Keep a working web page at every deep-linked address. When the app is missing, the browser opens it.
- If you use Play App Signing, take the fingerprint from Play Console; the one from your local keystore usually will not match.
- Exclude paths such as sign-in or checkout callbacks that must stay in the browser.
Frequently asked questions
Are deep links the same as Universal Links?
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.
What happens if the app is not installed?
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.
Where does apple-app-site-association go?
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.
Which Android versions verify App Links?
Android's docs say App Links work on Android 6 and later, on devices that have Google services.
How do I test Android verification?
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.
Build your site free or see all free tools. On We.Inc you can build your site free, with no card and no trial needed to start. AI building is on paid plans from $19 a month.
More in Guides
- What Is a JWT? Structure, Claims and Decoding
- What Is localhost? The Address That Always Means This Computer
- What llms.txt Does and Does Not Do for a Small Business Site | How-to Guide
- WhatsApp Link Preview: Why It Fails and How to Fix It
- White-Label Platform Contract Checklist for Agencies: What to Agree Before You Resell | How-to Guide
- White-Label AI App Builder for Agencies: Resell Apps
- White-Label Website Builder vs Enterprise CMS: An Honest Fit Guide | How-to Guide
- White-Label Website Builder Pricing: 5 Models, 50 Sites Cost
Product
Who It's For
- For Agencies
- For Freelancers
- For Hosting Providers
- For SaaS Platforms
- For Startups
- For Financial Services
- For Healthcare
Features
Resources
- Blog
- Help Center
- Free Business Tools
- Free UI Components
- Website Templates
- Template Collections
- Website Examples
- Guides
- Comparisons
- Alternatives
- Best Lists
- Reviews
- Pricing Guides
- Use Cases
- Glossary & Guides
- Integrations
- Developers
- Benchmark
- Windows App