Deep Linking Formats: Custom Schemes, Universal Links, and More

Deep Linking Formats: Custom Schemes, Universal Links, and More

Deep links come in more formats than most developers realize. Each one has different syntax, platform rules, and its own special way of failing silently. A link might work perfectly on iOS but 404 on Android, or accidentally open Chrome instead of your app. Here are 15 real examples custom URI schemes, Universal Links, App Links, intent URLs, and third-party app links along with the exact terminal commands to test them. Getting these formats wrong causes bugs you won't catch until production.

Custom URI Scheme Examples

Three cards illustrating custom URI scheme examples with dark background and accent color highlights.

Custom URI schemes use a proprietary protocol like myapp:// instead of https://. They'll open your app directly if it's installed. If it isn't? They just fail. No fallback.

Example 1: Basic custom scheme

Code
myapp://home

Opens the app's home screen. If the app isn't installed, most browsers show a blank page or a cryptic error. It's the oldest deep linking method around. People still use it for simple internal navigation because it's easy.

Example 2: Custom scheme with path and parameters

Code
myapp://product/4521?ref=email&coupon=SAVE10

Routes to a specific product screen and passes tracking parameters. The app's router parses the path (product/4521) and the query params separately. Fails silently if the app isn't on the device. A lot of email clients will also strip or block custom schemes entirely for security reasons.

Example 3: Custom scheme for authentication callback

Code
myapp://auth/callback?token=abc123&state=xyz

OAuth flows use this to hand control back to the app after a web-based login. The catch: it only really works if the app is already running in the background or the OS intercepts it to launch the app. You can't test this by just pasting the URL into a browser. You have to trigger the full auth flow.

Universal Links use standard https:// URLs that open natively in iOS apps when set up right. They look exactly like regular web links, which is their biggest advantage over custom schemes.

Example 4: Universal Link to app content

Code
https://yourdomain.com/products/4521

On iOS, this opens the app directly if the domain is verified via the apple-app-site-association (AASA) file and the app is installed. If the app isn't there, it just loads the webpage at that URL. Built-in fallback. Test it with:

Code
xcrun simctl openurl booted "https://yourdomain.com/products/4521"

Example 5: Universal Link with query parameters for campaigns

Code
https://yourdomain.com/offer?utm_source=newsletter&utm_campaign=fall26

Bundles app routing and marketing attribution into one link. After the app opens, it reads the query string to credit the right campaign. Where does this break? When the AASA file returns a 404 or has malformed JSON. This always breaks after domain migrations.

Example 6: Universal Link that falls back silently to Safari

Code
https://yourdomain.com/legal/privacy-policy

Not every path needs to open the app. Sometimes you intentionally exclude paths in the AASA config so they always open in Safari, even if the app is installed. Standard practice for privacy policies or support pages.

If you need to check if your domain's association file is actually set up right, Smler's AASA validator tool catches JSON and hosting errors before they hit production.

Branching diagram illustrating Android App Links verification process with two outcomes: app opens if verified, or disambiguation dialog if not.

Android App Links do the same thing as Universal Links, but they rely on a Digital Asset Links JSON file instead of AASA. Also, Android verifies these at install time, not when the user clicks.

Example 7: Basic App Link

Code
https://yourdomain.com/articles/october-2026-update

Opens the app if verification passed during install. If the app isn't verified, Android throws a disambiguation dialog at the user, making them choose between the app and the browser. That kills conversion. Test it with:

Code
adb shell am start -W -a android.intent.action.VIEW -d "https://yourdomain.com/articles/october-2026-update" com.yourpackage.name

Example 8: App Link with deep nested path

Code
https://yourdomain.com/stores/123/items/4521/reviews

Marketplace and ecommerce apps use these deeply nested paths constantly. Your router has to parse multiple segments. If even one route handler is missing, the app opens to the wrong screen. QA finds these bugs every single time.

Example 9: App Link failing due to unverified domain

Code
https://yourdomain.com/invite/friend123

If assetlinks.json is unreachable or the SHA256 fingerprint doesn't match, this link opens Chrome instead of your app. Android checks this during install. If you fix the file later, the user has to reinstall the app or trigger a manual verification. Check your fingerprint matches before shipping using Smler's Android assets validator.

Intent URLs for Android

Intent URLs let you control fallback behavior in Android within a single string. They're mostly a Chrome-specific hack.

Example 10: Intent URL with package fallback

Code
intent://product/4521#Intent;scheme=myapp;package=com.yourpackage.name;S.browser_fallback_url=https%3A%2F%2Fyourdomain.com%2Fproduct%2F4521;end

Tells Chrome to try opening the app using the scheme and package name. If the app isn't installed, it falls back to the encoded URL. This only works in Chrome and Chromium-based browsers. It completely fails in Firefox or native WebViews.

Example 11: Intent URL for Play Store redirect

Code
intent://details?id=com.yourpackage.name#Intent;scheme=market;package=com.android.vending;end

Forces the Play Store listing to open instead of relying on scheme detection. Super useful for SMS campaigns where you want guaranteed store behavior regardless of whether the app is already installed.

Flowchart depicting deferred deep linking process with referral parameter, minimalist design with accent color #3b82f6 on #212121 background

Deferred deep links survive the app install process. They route users to specific content even after they've made a pit stop at the app store. This fixes the biggest problem with standard deep links.

Example 12: Deferred link with referral parameter

Code
https://yourdomain.link/r/jsmith99?campaign=refer_a_friend

A new user clicks this, installs the app from the store, and on first open the app still knows they came from jsmith99's referral. To make this work, the app queries a matching service on first launch using device signals. Smler's referral links feature handles this without making you build the backend logic.

Example 13: Deferred link for creator attribution

Code
https://yourdomain.link/creator/mia_travels?content=summer_collection

Influencer campaigns lean on this pattern to tie installs and in-app actions back to specific creators. Without deferred linking, attribution is lost the second the user leaves the browser for the app store. If you're running these at scale, influencer marketing tracking aggregates the data automatically.

To understand the plumbing under the hood first, Smler's deep linking and deferred deep linking pages walk through the full request flow.

Looking at how big platforms structure their own deep links is a good reference for building yours.

Example 14: YouTube and Instagram links

Code
https://www.youtube.com/watch?v=dQw4w9WgXcQ
instagram://user?username=natgeo

YouTube uses a standard Universal Link. It opens the app or the web player depending on whether the app is installed. Instagram uses a custom scheme to open a profile directly, but since that has no web fallback, they also maintain https://instagram.com/natgeo as a parallel Universal Link.

Example 15: WhatsApp click to chat link

Code
https://wa.me/15551234567?text=Hello%20there

Technically a Universal Link that redirects through WhatsApp's servers before opening the chat screen with prefilled text. If the app isn't installed, it falls back to WhatsApp Web. Worth copying this fallback pattern for your own apps.

How to Test Each Format

Test deep links before launching. Terminal commands are the fastest way to catch routing bugs.

Format Platform Test Command
Custom scheme Android adb shell am start -a android.intent.action.VIEW -d "myapp://home"
Custom scheme iOS xcrun simctl openurl booted "myapp://home"
Universal Link iOS xcrun simctl openurl booted "https://yourdomain.com/path"
App Link Android adb shell am start -W -a android.intent.action.VIEW -d "https://yourdomain.com/path" com.package.name
Intent URL Android Chrome Paste directly into Chrome address bar

For a more natural test, you can also send your deep link via a messaging app like WhatsApp or Telegram to your device and tap the link to verify the redirection behavior.

Frequently asked questions

What's the difference between a Universal Link and a custom URI scheme?

A: Universal Links use regular https URLs and automatically fall back to a real webpage if the app isn't there. Custom schemes use proprietary protocols like myapp:// and just crash or show an error if the app is missing.

Why does my App Link open the Play Store instead of my app?

A: Domain verification failed. Check that your Digital Asset Links file is accessible and that the SHA256 fingerprint matches your signing key exactly.

Can intent URLs work in all browsers?

A: No, just Chrome and Chromium-based browsers on Android. Firefox, Safari, and native WebViews won't know what to do with them.

How do deferred deep links remember where a user should go after installing an app?

A: The app pings a matching service on first launch. The service uses device signals (IP address, timestamps) to connect the original click to the new install.

Should I test deep links on real devices or simulators?

A: Both. Simulators are fine for quick routing checks via adb or xcrun. But you have to test on real devices inside actual messaging apps to see the real user experience links in Slack or iMessage don't always behave the way they do in Safari.

What happens if my AASA file has incorrect JSON formatting?

A: iOS silently ignores it. Your app won't open for any links on that domain. Everything defaults to Safari instead. Validate the file before deploying.