2025-05-07 6 min read

Mobile Deep Linking Done Right: Universal Links & Deferred Deep Links

Deep linking is essential for mobile engagement, but implementation matters. Learn the difference between universal links, deferred deep links, and how to avoid common pitfalls.

Your app gets 10,000 installs a month. Your marketing team sends out a link that should open a product page directly. Instead, users land on your home screen. It's a coordination failure that costs conversions—and it's almost always preventable.

Deep linking is one of the most misunderstood features in mobile development. Not all deep links work the same way. Universal links and deferred deep links solve different problems, and mixing them up leads to broken user flows, support tickets, and lost revenue.

Understanding Deep Link Types

Universal Links (iOS) and App Links (Android)

Universal links are the gold standard. They use standard HTTPS URLs that work whether your app is installed or not. When a user taps a link to your domain, the OS checks a signed file on your server and routes directly into the app if it's installed.

For iOS, you need an

code
apple-app-site-association
file:

json
{
  "applinks": {
    "apps": [],
    "details": [
      {
        "appID": "TEAM_ID.com.yourcompany.app",
        "paths": ["/product/*", "/user/*"]
      }
    ]
  }
}

Host this at

code
https://yourdomain.com/.well-known/apple-app-site-association
. No trailing slash, no
code
.json
extension.

For Android, create an

code
assetlinks.json
file:

json
[{
  "relation": ["delegate_permission/common.handle_all_urls"],
  "target": {
    "namespace": "android_app",
    "package_name": "com.yourcompany.app",
    "sha256_cert_fingerprints": ["YOUR_SHA256_FINGERPRINT"]
  }
}]

Place this at

code
https://yourdomain.com/.well-known/assetlinks.json
.

Both files must be served over HTTPS. This is non-negotiable.

Deferred Deep Links

Deferred deep links solve a different problem: getting users to the right place even if your app isn't installed yet. When someone without your app taps a link, they're sent to the App Store or Play Store. After installation, they land in your app at the intended destination—not the home screen.

Deferred deep linking requires a third-party service or custom backend logic. Popular solutions include Firebase Dynamic Links (though Google deprecated it), Branch, and Adjust.

Here's a basic Firebase Dynamic Links example:

typescript
import { dynamicLinks } from '@react-native-firebase/dynamic-links';

const handleDynamicLink = (link) => {
  if (link?.url) {
    const route = link.url.replace(/.*\?link=/, '');
    // Navigate to route in your app
    navigation.navigate('Product', { id: route });
  }
};

dynamicLinks()
  .onLink(handleDynamicLink)
  .unsubscribe();

Common Pitfalls

Certificate Mismatches

The most common failure: your signing certificate doesn't match what you registered with Apple or Google. Run

code
security find-identity -v -p codesigning
to verify. If you change certificates—which happens during app rebuilds or team transitions—your deep links break silently.

Path Configuration

Being too specific with paths breaks flexibility. If you define

code
/product/123
but later want
code
/p/123
, links fail. Use wildcards generously:
code
/product/*
,
code
/user/*
. Handle unknown routes gracefully in your app.

Mixing Strategies

Deferred deep links are not a replacement for universal links. Universal links should be your primary mechanism for installed users. Deferred links only matter for new installs. Use both.

Missing Metadata

If your backend doesn't track which route a deep link should open, users get dropped at the home screen. At LavaPi, we've rebuilt numerous projects that lacked proper routing metadata. Always include explicit navigation data in your deeplink payload.

Testing Before Production

Test on real devices, not simulators. Open links from Notes, Safari, and email clients. Check behavior when the app is backgrounded, uninstalled, and across network states.

Use Apple's Validation Tool for

code
apple-app-site-association
and Google's Digital Asset Links debugger. Both tools catch certificate and formatting issues immediately.

The Takeaway

Deep linking looks simple but fails at scale. Universal links and app links handle installed users perfectly—get these right first, and they'll work for 95% of your traffic. Add deferred deep linking only when you need to support first-install flows. Test thoroughly. Verify your certificates. Avoid mixing strategies without understanding why.

Share
LP

LavaPi Team

Digital Engineering Company

All articles