Deep Linking in Mobile Apps: Routes That Work

Plan deep linking in mobile apps with verified domains, fallback routes, authentication handling and a practical release test matrix.

10 min read
A field worker passing a tablet to a colleague at a service vehicle

Deep linking in mobile apps should take a person from an email, search result or shared URL to the intended content, not merely open the app. That outcome depends on domain ownership, operating-system verification, route design and what happens when the app is absent or the user is signed out. For an Australian product team, the first useful deliverable is a route contract that web, mobile, analytics and support can all test.

Key Takeaways

  • Use ordinary HTTPS content URLs as the shared route, with a useful web destination when the app is unavailable.
  • Apple Universal Links and Android App Links require separate app-to-domain verification configurations.
  • Preserve the intended destination through sign-in, permission prompts and interrupted sessions without treating a link as authorisation.
  • Release against a device and entry-point matrix, then monitor destination failures rather than counting opens alone.

Plan Deep Linking in Mobile Apps Around Routes

Start with the user journey: a customer taps an order URL in a message, lands on the order detail, and can act if their account permits it. Write down the canonical HTTPS URL, content identifier, allowed query parameters, required account state and web fallback. The URL should remain useful outside the app. A short-lived campaign redirect can still point to this stable address, but the redirect chain must be tested on real devices because apps and browsers may handle intermediate hops differently.

A route such as https://example.com/orders/123 is a design illustration, not a 9Byte product route. The server should display an appropriate web page or access-controlled explanation when no app claims the URL. If the record has been deleted, do not silently send the user to the home screen. Give a meaningful not-found outcome; if access is denied, do not reveal private details in the fallback.

Separate destination data from promotional tracking. Keep only the parameters needed to locate content, validate their format, and strip unnecessary tracking from the route passed into sensitive screens. A link may carry untrusted input from a forwarded message. Apple's Universal Links guidance explicitly warns that handlers must validate URL parameters and avoid direct destructive or sensitive actions.

Understand the Two Verification Paths

On iOS, a Universal Link is an HTTPS link backed by an Associated Domains entitlement in the signed app and an apple-app-site-association file served by the website. Each participating subdomain needs deliberate configuration. Apple's associated-domains documentation specifies an HTTPS association file without redirects at the well-known path. A successful browser response alone does not prove that an installed app will claim the link; entitlement, app identifier, paths and device state all have to agree.

On Android, the app declares suitable HTTPS intent filters and the site serves /.well-known/assetlinks.json associating the domain with the signed package. Google's App Links verification guidance documents the host checks and an on-device verification command. Signing fingerprints matter: a release signed by the store can differ from a local build. Check the distribution build, not only the developer handset.

Neither mechanism is a universal promise that every tap opens the app. User preferences, browser context, mismatched hosts and stale association state can change the result. Maintain a sound web journey even when the app is installed. Custom URL schemes can serve certain controlled integrations, but they do not replace verified HTTPS ownership and a usable browser fallback for public sharing.

Design for the Broken Middle of the Journey

Authentication is the common failure point. If a signed-out user taps an order URL, store only a safe, validated pending destination, complete sign-in, then recheck account permission before presenting the order. The same rule applies after account switching: the route identifies a resource but does not grant access. Expire pending routes when they no longer make sense and avoid open redirects by accepting only an allowlist of in-app destinations.

What if the app is not installed? The HTTPS page must still explain the content or next step. What if the app is installed but offline? Show cached material only when its freshness and privacy rules allow it; otherwise explain that the requested item cannot be loaded and offer retry. What if an old email points to a renamed route? Maintain an explicit redirect or migration mapping and test whether the final destination preserves the identifier. These are product choices, not platform defaults.

Define back-stack behaviour as well. Opening an item from a cold start should give the user a sensible way back to a safe parent screen. Opening it while already editing another item should not discard unsaved work without warning. An invalid identifier, unsupported path or malformed query should land on a controlled error state rather than crash or expose internal diagnostics.

Implement a Route Contract Across Teams

List each route with a path pattern, owner, sample URL, required account state, destination screen, web equivalent and error outcomes. Version the contract alongside app and website changes. A marketing team should know which URLs are safe to distribute; support should know what a user sees after expiry; analytics should know which event means the target content actually rendered.

Build the simplest route first, then add a signed-out path and one stale-content path before expanding. On iOS, confirm the entitlement and association file against the actual app identifier. On Android, confirm the package and signing certificate against the hosted statements. Keep the web page and app route pointed at the same content concept even if their visual layouts differ. Where the content is inherently app-only, make the web fallback explain the limitation rather than pretend to show it.

Assign a release owner for association files. A web deployment can accidentally change headers, hostnames or redirects while the native app remains unchanged. Conversely, a new signing key or bundle identifier can break the handshake. Record who reviews both sides of the change, and include domain verification in release checks. The mobile application service overview is a starting point for discussing broader delivery scope, not evidence that any specific routing feature has already been implemented.

Test the Destination, Not Just the App Open

Build a matrix across iOS and Android, release-signed builds, installed and absent apps, cold and warm starts, signed-in and signed-out states, and permitted and denied records. Include links launched from a browser, a message and an email client. Test a redirected URL, a URL with a query string, a subdomain and an expired record. Google's App Links testing guide recommends verifying both host association and link handling; the product test still has to check the final screen.

Agree an acceptance gate before rollout: every supported route in the approved matrix must resolve to the specified content or the documented fallback; no tested route may expose data to an unauthorised account; malformed links must fail safely. Record device, OS, app build, entry point, URL and observed destination for each run. This is a proposed product gate, not a vendor benchmark. Add automated route parsing tests, but keep real-device checks because entitlement and browser behaviour sit outside a unit test.

After release, measure link-open attempts, successful target renders, sign-in continuation and fallback/error outcomes by route family and platform. Avoid claiming a successful conversion just because the application launched. Review a small sample of failed routes with support and campaign owners before changing URL rules. This narrow routing plan complements 9Byte's mobile app development cost guide, which addresses budgeting rather than link behaviour, and its React Native discussion, which addresses a build approach rather than a route acceptance test.

Related Resources

Common Questions About Reliable App Routes

1. Do deep links work if the app is not installed?

A properly designed HTTPS link can open its web destination when the app does not claim it. The website must still provide a useful and safe experience; an app-install prompt alone is not a substitute for the requested information.

2. Is a custom URL scheme enough?

Not for a public content-sharing strategy with verified domain ownership and web fallback. Use platform-supported HTTPS associations for that job, and assess custom schemes separately for controlled integrations.

3. Why does a link work on one phone but not another?

Check the installed build's signing identity, verified host, operating-system state, app settings and link entry point. A web page loading in a browser proves only that the website responded, not that device verification succeeded.

4. Should sign-in automatically open the original destination?

Only after validating the pending route and rechecking the signed-in user's permission. If access fails, show an appropriate denial or not-found state without leaking record details.

5. What should the team measure after launch?

Track successful destination renders and documented fallbacks by route and platform, alongside app opens. A rise in opens with no rise in target renders signals that routing or authentication needs investigation.

Make the Destination the Release Gate

A working deep link is a completed journey to the intended, permitted content. Write the route contract before publishing links, then test its failed states alongside its happy path. Keep the website fallback and the signed app in the same release conversation. Start with one high-value route and do not expand the campaign until its destination gate passes on both platforms.

Ready to build what is next?

Talk to our Melbourne engineering team about modernising your systems or shipping your next product.