Building iOS, Android & Flutter apps for clients in the USA · UK · UAE · Worldwide +92 333 9799025WhatsAppjunaidtariqlhrpk@gmail.com
Backend

Deep Linking in Mobile Apps: Universal Links and App Links

How to set up Universal Links and Android App Links, replace Firebase Dynamic Links, handle deferred deep links and test every path before launch.

Deep linking in mobile apps sounds like a small feature: tap a link, land on the right screen. In practice it touches your web domain, your backend, both app stores’ signing setups, marketing attribution and sign-in. When one piece is wrong, the link opens a browser, a home screen or a 404, and nobody notices until a campaign underperforms.

The setup lives partly on your servers, which is why we treat it as part of mobile app backend development rather than a last-minute app task. This guide covers the three kinds of deep link, how Universal Links and Android App Links verify, what to do now that Firebase Dynamic Links is gone, how to route links inside the app, and a testing checklist for release day.

Most apps need the second type and some need the third. The first is a fallback, not a strategy.

Type How it works Good for Weak spot
Custom URL scheme (myapp://) The app registers a scheme; links with it open the app Internal app-to-app calls, some SDK callbacks No ownership check; another app can claim the same scheme; breaks if the app is not installed
Verified web links (Universal Links, App Links) Normal https links; the OS checks a file on your domain before opening the app Email, SMS, social, QR codes, password resets, shared content Setup errors silently send users to the browser
Deferred deep links The intended destination survives an app install Invites, referrals, paid campaigns to new users Needs a vendor or your own matching logic

Verified links are also the safer choice for OAuth redirects. RFC 8252 lists claimed https redirects as an option for native apps alongside private-use schemes.

On Apple platforms, verification uses a JSON file named apple-app-site-association with no file extension, placed at https://yourdomain.com/.well-known/apple-app-site-association. The app declares the domain in its Associated Domains entitlement as applinks:yourdomain.com. Apple’s associated domains documentation is strict on hosting: the file must be served over https:// with a valid certificate and with no redirects.

Two details that cause most iOS failures

Every subdomain counts separately. www.example.com and example.com each need their own file and their own entitlement entry. Marketing links on go.example.com will not open the app just because the main domain works.

Apple’s CDN sits in the middle. Since iOS 14 and macOS 11, devices fetch the file from an Apple-managed CDN, not from your server. Apple says the CDN requests the file within a 24-hour window, and installed devices check for updates approximately once per week. A fix to your AASA file is therefore not instant, and testing on a phone that installed the app last week can show old behaviour. Test fixes on a fresh install, and get the file right before launch.

Common causes beyond those two: a CDN or firewall that redirects or blocks the .well-known path, a login wall in front of the domain, or path patterns in the file that do not match the URLs marketing actually sends.

On Android, an intent filter with android:autoVerify=“true” tells the system to verify each host by fetching https://yourdomain.com/.well-known/assetlinks.json. According to Android’s App Links documentation, the file must be served over HTTPS, even if the intent filter declares http, with content type application/json and without any redirects. It lists your app’s package name and the SHA-256 fingerprints of its signing certificates.

The fingerprint trap

With Play App Signing, Google signs the build users install. A fingerprint taken from your local keystore with keytool will usually not match. Copy the snippet from Play Console under Release, Setup, App signing. Add the debug or upload-key fingerprint too if testers install builds signed outside Play.

Why Android 12 raised the stakes

Starting in Android 12 (API level 31), a generic web link opens your app only if the app is approved for that specific domain. If verification fails, the link opens in the user’s default browser instead. Nothing tells the user why, so the failure shows up only in analytics as lower app opens.

Firebase Dynamic Links has shut down

Firebase Dynamic Links stopped working on 25 August 2025. According to Google’s Dynamic Links FAQ, all links now return HTTP 404, including custom domains and page.link links, and page.link domains cannot be kept or transferred. Any QR code, email or printed material that used them is broken. Google suggests App Links and Universal Links for installed apps, Firebase Hosting to serve the verification files, and third-party providers for full feature parity.

Start by listing what Dynamic Links did for you. For many apps it was only two jobs: opening the app from a shared link, and sending users without the app to the right store. Verified links on your own domain cover the first job. A web page at that link URL covers the second: if the app is not installed, the browser loads the page, which shows the content or a store button.

Deferred deep linking is the harder part. Branch’s glossary describes it as a deep link that survives an install, so a new user goes through the app store and then lands on the specific content. If your growth depends on it, for invites, referrals or paid campaigns, Google lists Adjust, Airbridge, AppsFlyer, Bitly, Branch, Kochava and Singular as providers, while noting it has not vetted them. Compare them on attribution features, pricing and privacy terms during discovery.

Some products can avoid a vendor with account-based matching. An invite link carries a code. The new user installs, signs up, and enters or confirms the code, or the server matches the invite to the email address they register with. It is less automatic, but it uses no device fingerprinting and stays within your own systems. Paid acquisition at scale usually still needs an attribution provider; our mobile app marketing company page covers how that fits with campaign tracking.

The order we follow so that old links fail as gracefully as possible and new ones work everywhere.

Inventory every link source

Search the codebase, email templates, push payloads, CMS content, printed QR codes and ad campaigns for page.link and custom Dynamic Links domains. Each one is now a 404.

Choose the link domain

Use a subdomain you control, such as link.example.com, with its own AASA and assetlinks files. Keep it off the main marketing site’s redirect rules.

Publish the verification files

Serve both files over HTTPS with no redirects. Firebase Hosting or any static host works. Add the domain to the iOS entitlement and the Android intent filters.

Build the fallback web page

For each link pattern, the web page shows the content or a store button with the destination preserved, so users without the app are not stranded.

Ship the app update and replace links

Release the app with the new routes, then swap links in templates, notifications and campaigns. Reprint QR codes that matter.

Links not opening your app?

Send us a few failing links and your app IDs. We reply within one business day with what is wrong in the AASA, assetlinks or routing setup and what it takes to fix it.

Verification gets the user into the app. Routing decides whether they land somewhere useful. Many deep-link bugs live here rather than in the verification files.

  • One central router. Every entry point (Universal Links, App Links, push notifications, widgets, in-app links) passes a URL to the same router. Two parsing paths mean two sets of bugs.
  • Cold start and warm start. A link that opens a closed app arrives through a different callback from one that opens a running app. Test both on both platforms.
  • Sign-in gates. If the destination needs an account, store the destination, run sign-in, then continue. Dropping users on the home screen after login loses many of them.
  • Missing or forbidden content. Deleted items, expired offers and content for another account need a friendly screen, not a crash or a blank view.
  • Versioned paths. Old app versions stay installed for months. Keep link paths stable and let the web fallback handle routes an old build does not know.
  • Attribution parameters. Read UTM or campaign parameters into analytics, then strip them before routing.

Push notifications should carry a deep link URL rather than a custom payload format, so the same router handles them. Our push notifications for mobile apps page covers the delivery side.

Security rules for deep linking in mobile apps

A deep link is input from outside the app, and anyone can craft one. Treat it that way.

  • Validate every parameter. IDs, amounts and redirect targets in a link are untrusted. Look them up on the server; never trust a price or role from a URL.
  • No long-lived secrets in links. Password-reset and magic sign-in links should be single-use and short-lived, and should open through verified links, not custom schemes another app could register.
  • Use verified links for OAuth redirects. RFC 8252 requires native apps to use the system browser for authorization and PKCE for public clients. Our authentication and SSO for mobile apps page covers the full flow.
  • Confirm destructive actions. A link should never delete, pay or change settings without a confirmation screen.

Run this on real devices before every release that touches links, and after any change to the domain, CDN or signing setup.

  • AASA and assetlinks.json load over HTTPS with no redirects, on every domain and subdomain used
  • assetlinks.json includes the Play App Signing fingerprint, not just the local keystore
  • Links open the app on a fresh iOS install and a fresh Android install
  • Links open the right screen from a cold start and from a warm start
  • Links tapped in email apps, messaging apps, social apps and the browser behave as expected
  • With the app not installed, the web fallback shows content or a store button
  • Signed-out users go through sign-in and land on the original destination
  • Deleted or forbidden content shows a friendly screen
  • Push notification links use the same router as web links
  • Deferred links reach the right content after install, if you use them
  • No remaining page.link or old Dynamic Links URLs in templates, code or campaigns

Deep linking in mobile apps: frequently asked questions

What is the difference between Universal Links and App Links?

They solve the same problem on different platforms. Universal Links are Apple’s verified https links, checked against an apple-app-site-association file on your domain. Android App Links are Google’s equivalent, checked against an assetlinks.json file with your signing-certificate fingerprints. Both open the app when it is installed and fall back to your website when it is not.

What should replace Firebase Dynamic Links?

Firebase Dynamic Links shut down on 25 August 2025 and all links now return 404. For opening an installed app, use Universal Links and App Links on a domain you control, with a web fallback page. For deferred deep links and attribution, Google lists third-party providers such as Branch, AppsFlyer and Adjust, which it says it has not vetted.

Why does my Universal Link open Safari instead of the app?

Usually because the AASA file is redirected, served from the wrong path, missing for that subdomain, or does not match the link’s path. Since iOS 14, devices read the file through Apple’s CDN, which can take time to pick up changes, and installed devices check roughly weekly. Test fixes on a fresh install before assuming they failed.

Why do Android App Links open the browser on Android 12 and later?

From Android 12, a web link opens your app only if the app is verified for that domain; otherwise it goes to the default browser. The usual cause is an assetlinks.json file with the wrong fingerprint. With Play App Signing, copy the fingerprint from Play Console rather than your local keystore, and check the file has no redirects.

Do I need a paid provider for deferred deep linking?

Not always. If you only need invites or referrals, account-based matching with an invite code can work without a vendor. If paid campaigns and install attribution drive your growth, a provider is usually worth it. Compare them on attribution features, privacy terms and pricing before choosing, and keep links on your own domain where possible.

Get deep links working on both platforms

Tell us which links matter to your growth. We reply within one business day with a setup plan covering verification files, routing, fallbacks and testing, delivered as part of our mobile app backend development work.

Leave a Reply

Your email address will not be published. Required fields are marked *

WhatsApp Call