Kokil Thapa - Professional Web Developer in Nepal
Freelancer Web Developer in Nepal with 15+ Years of Experience

Kokil Thapa is an experienced full-stack web developer focused on building fast, secure, and scalable web applications. He helps businesses and individuals create SEO-friendly, user-focused digital platforms designed for long-term growth.

Deep Linking in Mobile Apps

By Kokil Thapa | Last reviewed: September 2026

Deep linking in mobile apps connects a URL tap to a specific screen inside your installed app instead of a browser tab. That matters when email, SMS, push, QR codes, or social posts must open a product, booking, or document view directly. On production systems I maintain, the mobile team owns native routing while my Laravel or WordPress backend supplies consistent URLs and authenticated hand-offs through the WooCommerce REST API for mobile apps. This guide covers what actually breaks in production and how to design links that survive app store review, OS updates, and marketing campaigns.

What Is Deep Linking in Mobile Apps and Why Does It Matter?

A deep link is any link that opens content beyond your app's home screen. A shallow link opens the launcher icon. A deep link opens /orders/4821 or /lawyer/john-smith inside the installed binary.

Without deep linking in mobile apps, every campaign URL lands in Safari or Chrome. Users log in again. Carts reset. Push notification taps feel broken. Conversion drops because the friction is real and measurable.

Three business outcomes drive the engineering work:

  • Acquisition: ad and social URLs open the app when installed, or the store when not.
  • Retention: push and email taps land on the exact order, message, or booking.
  • Attribution: campaign parameters survive the hop from web to app install.

On a legal-tech portal I built, document-upload reminders must open the client's case folder—not the login screen three taps away. The same pattern applies to client portals with document sharing and eCommerce order tracking.

Deep Linking in Mobile Apps — OverviewEmail / SMSPush AlertQR / SocialWeb BannerHTTPS Deep Link URLhttps://yourdomain.com/pathApp InstalledOpens native screenApp MissingStore or web fallbackDeferred LinkPost-install route
Deep linking in mobile apps routes marketing and notification URLs to native screens, store pages, or deferred post-install destinations.

Mobile platforms offer three main mechanisms. Pick based on security needs, fallback behaviour, and whether you control the web domain.

MechanismExampleVerified domainFallback if app missingProduction fit
Custom URI schememyapp://product/9NoError dialog or nothingLegacy, dev-only, or paired with HTTPS
iOS Universal Linkshttps://shop.example/p/9Yes — AASA fileOpens Safari pagePrimary choice for iOS production
Android App Linkshttps://shop.example/p/9Yes — assetlinks.jsonOpens Chrome pagePrimary choice for Android production
Intent URLs (Android)intent://…#Intent;…PartialCan target Play StoreUse sparingly; test on many devices

Custom schemes are easy to register but any app can claim myapp://. A malicious app could intercept taps on some Android builds. HTTPS-based links with domain verification fix that.

Apple documents Universal Links in its Supporting Universal Links guide. Google documents App Links in the Android App Links training module. Read both before you ship.

When custom schemes still make sense

Use a custom scheme only as a secondary path. Some SDKs and older integrations expect it. Pair it with HTTPS links in email templates so users without the app still reach a web page.

Deep linking in mobile apps fails more often at the server layer than inside Swift or Kotlin. The association files must be reachable, valid JSON, and served without redirects.

On sister sites I deploy with Deployer 7 and GitLab CI, I treat these files like production config. A broken AASA file silently disables Universal Links with no user-visible error.

Apple App Site Association (AASA)

Host this file at https://yourdomain.com/.well-known/apple-app-site-association with no file extension. Content-Type should be application/json.

{
  "applinks": {
    "apps": [],
    "details": [
      {
        "appID": "TEAMID.com.yourcompany.shopapp",
        "paths": ["/p/*", "/orders/*", "/account/*"]
      }
    ]
  }
}

Replace TEAMID with your Apple Developer Team ID. Paths support wildcards. Exclude admin routes explicitly if needed.

Host assetlinks.json at https://yourdomain.com/.well-known/assetlinks.json.

[
  {
    "relation": ["delegate_permission/common.handle_all_urls"],
    "target": {
      "namespace": "android_app",
      "package_name": "com.yourcompany.shopapp",
      "sha256_cert_fingerprints": [
        "AB:CD:EF:..."
      ]
    }
  }
]

Use the signing certificate fingerprint from your release keystore. Debug and release builds need separate entries during development.

Domain Verification for Deep LinksUser Taps URLHTTPS linkOS ChecksDomain proofFetch FileWell-knownVerifiediOS: AASA File/.well-known/apple-app-site-associationAndroid: assetlinks/.well-known/assetlinks.jsonOpen in AppNative handlerOpen BrowserWeb fallback
Deep linking in mobile apps requires AASA and assetlinks.json files on your web server before the OS routes HTTPS URLs into the native app.

Apache configuration for association files

On Ubuntu servers where I run Apache and PHP-FPM, I serve AASA without redirects:

<Files "apple-app-site-association">
    Header set Content-Type "application/json"
</Files>

<Files "assetlinks.json">
    Header set Content-Type "application/json"
</Files>

A 301 from HTTP to HTTPS on the association path breaks iOS verification during CDN changes. Test with curl before every deploy.

Native developers parse paths. Backend developers own the URL contract. If marketing changes slugs without telling the app team, deep links break silently.

On a production Laravel application, I keep web routes and deep-link paths identical. The same /bookings/{uuid} URL works in Blade, the API, and the mobile router.

  1. Define a URL schema document shared by web, API, and mobile teams.
  2. Use stable identifiers—UUIDs or numeric IDs—not slugs that change with SEO edits.
  3. Return 404 for deleted resources so the app can show a friendly screen.
  4. Pass auth tokens via secure exchange, never long-lived secrets in query strings.
  5. Log link opens server-side for attribution and debugging.

Laravel route example

Route::get('/orders/{order:uuid}', function (Order $order) {
    if (request()->header('Accept') === 'application/json') {
        return new OrderResource($order);
    }

    return view('orders.show', compact('order'));
})->name('orders.show');

The mobile app registers /orders/* in its link handler. The web view and JSON API share one canonical path. That alignment mirrors good internal linking strategy for SEO—one URL, one meaning.

For WooCommerce-backed mobile clients, product and order endpoints must match the paths you advertise in campaigns. See the API development service page for how I structure these contracts on client projects.

Never put a JWT in a marketing URL. Anyone who forwards the SMS can hijack the session.

A safer pattern:

  • Generate a one-time token stored in Redis with a five-minute TTL.
  • Embed ?t=abc123 in the deep link.
  • App exchanges the token for a Sanctum or Passport session via POST.
  • Invalidate the token immediately after use.

I use Redis caching patterns on Laravel apps for exactly this kind of short-lived state. The same Redis 8.10 instance can hold rate limits and token exchanges.

Validate JSON payloads during development with the JSON formatter tool before you paste association files into production.

Deep Link Type Decision TreeNeed a deep link?Own HTTPS domain?No domain controlUniversal + App LinksProduction defaultCustom URI schemePlus web fallback pageAdd deferred link if install needed
Choose verified HTTPS deep linking in mobile apps when you control the domain; fall back to custom schemes only with a web safety net.

A deferred deep link preserves the intended destination across app install. User taps an ad, installs from the store, opens the app, and lands on the product—not the home screen.

Implementation options in 2026:

  • Platform APIs: Apple App Clips and Android Play Install Referrer carry context with privacy constraints.
  • Third-party SDKs: Branch, AppsFlyer, and Adjust handle fingerprinting and pasteboard hand-off.
  • Self-hosted: Store intent in a signed cookie on the web fallback, read it on first app launch via authenticated API.

Push notifications depend on deep linking in mobile apps to feel native. A booking reminder must open /bookings/abc, not the app root.

On the Adventure Third Pole Trek booking platform, supplier alerts and client confirmations share URL patterns with the web CRM. That consistency reduced support tickets after we aligned paths. Similar work appears in the Adventure Third Pole Trek portfolio case.

Read the push notifications for mobile apps article for payload structure. Put the deep link path in the data block, not only the notification title.

Testing checklist before launch

  1. Tap link with app installed—cold start and background resume.
  2. Tap link with app uninstalled—confirm store or web fallback.
  3. Tap link on iOS and Android from Gmail, Messages, and Slack.
  4. Verify association files with Apple's and Google's online validators.
  5. Confirm logged-out users reach a login screen with return URL preserved.
  6. Run mobile CI/CD with Fastlane smoke tests on staging builds.

Security review belongs in the same sprint. Open redirects in deep link handlers are a common finding during mobile app security basics audits.

Deferred Deep Link FlowAd Click/product/42Web FallbackStore intent savedInstall AppFrom storeFirst OpenSDK or API Retrieves IntentMatch install to /product/42Product ScreenUser sees item 42Match FailedHome + promo banner
Deferred deep linking in mobile apps stores campaign intent on the web, then restores the target screen after first app launch.

How Do PWAs and eCommerce Backends Fit Into Mobile Deep Linking?

Not every business needs a native app. A progressive web app handles many deep-link use cases through standard HTTPS routes and service workers.

When clients do need native apps—payment flows with eSewa or Khalti, offline trekking itineraries, or florist checkout—the web and app must share one link vocabulary.

On WooCommerce and custom Laravel eCommerce builds like Quick And Easy Nepalese Grocery, I expose stable product and order URLs. The mobile wrapper consumes the same paths. Payment return URLs for eSewa integration in PHP apps and Khalti in Laravel must match what the app registers as handled links.

For Shopify clients, use the 2026-07 Admin API version or later when syncing product handles to app routes. Handle changes break links unless you map by numeric product ID internally.

Enterprise teams building booking or directory apps should treat deep link design as part of architecture review, not a marketing afterthought. The enterprise application development engagement model includes URL contracts in the planning phase.

Common production failures I have seen

These issues appear repeatedly across client projects:

  • CDN caches a 404 for the AASA file after a bad deploy.
  • Marketing adds UTM parameters that the app router does not strip before matching.
  • Slug changes in WordPress break old email links with no redirect rule.
  • Staging domains leak into production push payloads.
  • Android release signed with wrong keystore—assetlinks mismatch.

Fix redirects at the web layer first. A website migration without link mapping destroys years of saved deep links in user inboxes.

Offline-first apps add another layer. Cached screens may show stale data if the deep link arrives without network. Coordinate with offline-first mobile app patterns so the router queues API fetches after navigation.

For Nepal-facing apps with Nepali content in URLs, normalise Unicode paths server-side. Tools like the Nepali Unicode converter help QA teams verify that encoded paths match what iOS passes to the handler.

Key Takeaways

  • Prefer verified HTTPS Universal Links and App Links over bare custom URI schemes for production deep linking in mobile apps.
  • Host AASA and assetlinks.json without redirects, with correct JSON content types, on every campaign domain.
  • Keep web routes, API endpoints, and mobile path handlers on one shared URL schema document.
  • Exchange one-time tokens for authenticated screens—never embed long-lived credentials in marketing links.
  • Test cold start, background resume, and uninstall fallback on real devices before every major release.
  • Align payment return URLs and push payload paths with backend routes so eCommerce deep links do not dead-end.

People Also Ask

A deep link is any URL that opens specific in-app content. A Universal Link is Apple's verified HTTPS implementation of deep linking. Android's equivalent is an App Link. Both require server-side domain association files.

Standard deep links open the browser or show an error if the app is missing. Deferred deep links store the intended path during install so the first launch can route correctly. Always ship a web fallback page with a store badge.

Yes. Some clients wrap URLs through security proxies. Use clean HTTPS links without javascript redirects. Test taps from Gmail, Outlook, and Apple Mail on both platforms before campaigns go live.

Both. Backend owns canonical paths, redirects, and association files. Mobile owns native routing and parameter parsing. Marketing and SEO should review slugs before they ship in paid campaigns.

Deep linking in mobile apps is a cross-team contract—not a native-only feature. The server files, URL schema, auth exchange, and fallback pages matter as much as the Swift or Kotlin handler. Get those right and every push, SMS, and ad URL lands where the user expects.

If you are planning a Laravel or WooCommerce backend for a mobile client, map deep link paths during architecture—not after the app store deadline. Contact us to review your URL schema, association files, and API hand-off flow, or explore the e-commerce development and custom software development services for full-stack delivery.

Frequently Asked Questions

Deep linking maps a URL or custom scheme to a specific native screen—not just the app home screen. It lets email, SMS, push, QR, and social links open orders, products, or documents inside the installed app.

A deep link is any URL opening specific in-app content. A Universal Link is Apple’s verified HTTPS version requiring an AASA file. Android’s equivalent is an App Link with assetlinks.json.

Standard deep links open the browser or show an error without the app. Deferred deep links preserve the destination across install. Always ship a web fallback page with a store badge.

Custom schemes like myapp://product/9 are easy to register but unverified—any app can claim them, and missing apps show errors. Universal Links and App Links use HTTPS URLs with domain verification via AASA and assetlinks.json, opening Safari or Chrome when the app is absent. Use custom schemes only as a secondary path paired with HTTPS fallbacks in production.

Host apple-app-site-association at /.well-known/ with no extension and Content-Type application/json, listing your Team ID, bundle ID, and path wildcards. Host assetlinks.json at /.well-known/ with your Android package name and release keystore SHA-256 fingerprint. Serve both without redirects— a 301 on these paths breaks iOS verification. Test with curl before every deploy.

Keep web routes, API endpoints, and mobile path handlers identical—one URL schema document shared across teams. Use stable UUIDs or numeric IDs, not SEO slugs that change. Return 404 for deleted resources. Log link opens server-side for attribution. On production Laravel apps, the same /orders/{uuid} path serves Blade, JSON API, and the mobile router without drift.

Never embed a JWT or long-lived secret in a marketing URL—forwarded SMS or email can hijack the session. Generate a one-time token stored in Redis with a five-minute TTL, pass ?t=abc123 in the link, and let the app exchange it for a Sanctum or Passport session via POST. Invalidate the token immediately after use.

Deferred deep links preserve campaign intent across app install—user taps an ad, installs from the store, opens the app, and lands on the product screen. Options include Apple App Clips, Android Play Install Referrer, third-party SDKs like Branch or AppsFlyer, or self-hosted signed cookies read on first launch via authenticated API. Essential when acquisition campaigns must survive the install hop.

Put the deep link path in the notification data block, not only the title. A booking reminder should open /bookings/abc, not the app root. Align push payload paths with web CRM routes—on booking platforms I've worked on, supplier alerts and client confirmations share URL patterns with the web backend, which cuts support tickets after path alignment.

Yes. Some clients wrap URLs through security proxies, and javascript redirects break tap behaviour. Use clean HTTPS links without redirect chains. Test taps from Gmail, Outlook, Apple Mail, Messages, and Slack on both iOS and Android before campaigns go live—email is where broken deep links surface first.

Both, plus marketing and SEO for slug review. Backend owns canonical paths, redirects, and association files on the web server. Mobile owns native routing and parameter parsing. Treat deep link design as architecture review, not a marketing afterthought—slug changes without coordination break links silently in saved inboxes.

CDN caching a 404 for the AASA file after a bad deploy. Marketing UTM parameters the app router does not strip before matching. WordPress slug changes with no redirect rule. Staging domains leaking into production push payloads. Android release builds signed with the wrong keystore causing assetlinks mismatch. Website migrations without link mapping destroy years of saved deep links.

PWAs handle many deep-link scenarios through standard HTTPS routes and service workers without a native binary. Native apps are warranted for payment flows with eSewa or Khalti, offline itineraries, or complex checkout. Either way, web and app must share one link vocabulary—stable product and order URLs exposed from WooCommerce or Laravel backends that mobile wrappers consume identically.

Payment return URLs for eSewa in PHP apps and Khalti in Laravel must match paths the native app registers as handled links. For WooCommerce-backed mobile clients, product and order REST API endpoints must mirror campaign paths. On Shopify builds, use the 2026-07 Admin API or later and map by numeric product ID internally—handle changes break links unless you insulate routing from slug edits.

Tap with app installed on cold start and background resume. Tap with app uninstalled—confirm store or web fallback. Test iOS and Android from Gmail, Messages, and Slack. Validate association files with Apple and Google online validators. Confirm logged-out users reach login with return URL preserved. Run Fastlane smoke tests on staging builds. Review deep link handlers for open redirects in the same sprint.

Share this article

0 Comments

Leave a comment

Your email is not published. Comments appear once they have been read. Sign in to have your details filled in.

Quick Contact Options
Choose how you want to connect me: