1. Home
  2. Blog
  3. Mobile

Mobile

How to Set Up Mobile Deep Links and Universal Links: Fallback, Deferred Linking and Testing Guide

How to set up mobile deep links and universal links: target mapping, fallback, deferred linking, login redirects, security, testing and payback, step by step.

Contents 15 sections
  1. What Is a Deep Link?
  2. How Does a Web Link Map to a Target Inside the App?
  3. What Should Happen When the App Is Not Installed? The Fallback Path
  4. How Does Deferred Deep Linking Work?
  5. How Do You Redirect After Sign-In for Protected Targets?
  6. How Do You Keep Deep Links Secure?
  7. How Are Deep Links Used With Push, Email and SMS?
  8. How Do You Measure Campaigns?
  9. How Do You Build the Test Matrix?
  10. How Is the Broken-Link Rate Measured?
  11. How Are the Cost and Payback of Deep Links Calculated?
  12. How Do You Set Up Deep Links in Six Steps?
  13. What Are Common Deep Link Mistakes?
  14. Mobile Apps and Integration With İnovabil
  15. Frequently Asked Questions

A dealer taps the "Your order is awaiting approval" link in an email on their phone. If the app is installed, that exact order screen should open. If it is not, a web page or the store page should open. If the dealer is not signed in, the sign-in screen should appear and, afterwards, the same order. None of this happens by itself. The mechanism that carries a web link to the right screen inside the app is the deep link, and the kind that opens an installed app through domain verification is called a universal link (app link).

This guide explains how to set up deep links for a business app: the target mapping table, the fallback path when the app is not installed, deferred deep linking, redirects after sign-in, security, use with push, email and SMS, campaign measurement, a test matrix, the broken-link rate and a payback calculation. The example is a dealer portal mobile app; every figure is illustrative.

Key ideaA deep link is not a redirect, it is a contract: "this web address corresponds to this app screen, and this user may enter it". The contract has to spell out four conditions: is the app installed, is the user signed in, does the app version know the target, and is the user allowed to see it. Whichever one is missing makes the link "broken", and that is what you measure.

A deep link is a link that opens a specific screen of an app, such as a single order or invoice, instead of its home screen. There are three types, and most projects use all three together.

TypeFormatStrengthWeakness
Scheme linkApp-specific address prefixEasy to set upFails if the app is missing; ownership is not verified
Universal linkAn https address on your own domainOpens the app if installed, the web page if not; domain is verifiedNeeds a verification file on the domain and setup on each platform
Deferred deep linkCarries the target through the store journeyThe target survives a fresh installRisk of a wrong target if matching is ambiguous

For a business app the main type is the universal link, because the same address works in email, SMS and on a web page. Scheme links stay inside the app or serve as a backup. For the platform-specific steps of domain verification, follow the official documentation of the two mobile platforms; the rules change with versions. We covered the basics of the app itself in our guide to building a mobile app.

We recommend reading: Our mobile app development service

The mapping table is the single source of truth for the link scheme. Each row holds the web path, the in-app screen, the sign-in requirement and the permission rule. The web team, the mobile team and the team that sends notifications all read it from the same file.

TargetWeb pathIn-app screenSign-inPermission rule
Order/order/{no}Order detailRequiredOrder must belong to the user's dealer
Invoice/invoice/{no}Invoice viewRequiredInvoice belongs to the user's dealer and role is "accounting" or "admin"
Approval request/approval/{no}Approval screenRequiredUser must be the approver of that request
Product/product/{code}Product pageNot requiredNone; public catalog

Add two rules to the table. First, parameter format: an order number is, say, an eight-digit number, and a value that does not match is rejected before any screen opens. Second, unknown paths: if the app does not know the target (an old version or a newly added path), it does not drop to the home screen; it shows "Update your app for this link" and the web page. The version policy is described in our app version management guide.

What Should Happen When the App Is Not Installed? The Fallback Path

The fallback path makes sure everyone who taps the link ends up somewhere. The rule is simple: if the app cannot open, the web equivalent of the same target opens; if there is no web equivalent, the store page is shown. Never an empty page or an error message.

Decision flow when a deep link is tapped: installed, signed in, version knows the target, permission, target screen
The six-step decision flow when a link is tapped.
  1. Tap: The link arrives by email, SMS or notification; the address is on your own domain.
  2. Installed? If yes, the app opens; if not, the web page opens.
  3. Signed in? If the target needs sign-in and there is no session, the sign-in screen opens and the target is stored.
  4. Does the version know the target? If not, an update prompt and the web equivalent are shown.
  5. Permission? The user's right to see the target is checked on the server.
  6. Target screen: If everything passes, the right screen opens and the click record is completed.

How Does Deferred Deep Linking Work?

A user without the app taps the link, goes to the store, installs the app and opens it for the first time. Without deferred deep linking, the user lands on the home screen and has to look for the pending order. With it, the server keeps a short-lived record at the moment of the tap: the target path and a matching key. On first launch the app asks for that record and, if it matches, goes to the target.

  • Short window: The record stays valid for a short time, for example 60 minutes; a long window raises the chance of a wrong match.
  • Home screen when unsure: If the match is not certain, the target is not shown. Showing the wrong target to the wrong user is worse than showing none.
  • Permission check again: Even if the match is wrong, the target screen checks the user's permission, which limits the damage.
  • Single use: The record is deleted after use.

The store journey and first release are covered in our app store publishing guide. Keep personal data out of the record; the target and the key are enough. Take consent and cookie questions to your legal counsel.

How Do You Redirect After Sign-In for Protected Targets?

If a dealer opens an order link and the session has expired, after the sign-in screen the user should return to the order, not the home screen. For that, the app stores the target path temporarily before sign-in and uses it once when sign-in succeeds.

  • Short life: The stored target is valid for about 15 minutes; after that the home screen opens.
  • Single use: The target is applied once; the back button does not return to the sign-in screen.
  • No session data in the link: A token or password that stands in for sign-in never goes into a link.
  • Different account: If the signed-in user does not belong to the dealer the link points to, the target does not open; the user lands on the home screen with a clear message.

A link is external input; treat it like something a user typed. Four defensive principles are enough.

  • Do not trust the parameter: The order number in a link only says which record to request. Amount, status or user identity is never taken from the link; it is read from the server.
  • Do not allow open redirects: Parameters like "return here after sign-in" are limited to allowed in-app paths and your own domains; the app never goes to an arbitrary external address.
  • Check permission at the target: Knowing the link grants no access. For another dealer's order, "does not exist" and "not permitted" return the same response, so the existence of a number does not leak.
  • Keep secrets out of links: Personal data and session data do not sit in the address; addresses remain in email logs, message history and redirect logs.

Publishing the domain verification file correctly is part of security as well; the details are in each platform's official documentation.

All three channels use the same mapping table; the difference is how the link travels. In a push notification the target travels inside the notification as a path and the app is already installed. In email and SMS the link is an https address, so users without the app arrive here too. The notification itself is covered in our push notification guide.

In SMS, length is cost. In the illustrative example the text is 125 characters. With tracking parameters, a 142-character long link brings the total to 125 + 142 = 267 characters, which is two segments at the 153-character concatenated segment limit. With a 26-character short link the total is 151 characters, which fits one segment within the 160-character limit. At 30,000 SMS per month, one segment of difference at a unit price of 0.40 is 30,000 × ₺0.40 = ₺12,000 (not included in the payback calculation). Character and segment counting rules vary by provider; verify them in the provider's documentation. For transactional SMS design see our transactional SMS guide.

ChannelClicksBroken linksRateTypical cause
Push notification4,000401.0%Unknown path in an old version
Email4,00048012.0%Tracking wrapper around the link does not open the app
SMS2,00034017.0%Shortened link opens in the browser
Total10,0008608.6%

Note: if email and SMS sending systems wrap the link in their own tracking address, universal links can stop working. The wrapper address must also be on your domain and verified. For flow management our marketing automation guide is useful.

How Do You Measure Campaigns?

Each link carries source, medium, campaign and a link ID; the link ID matches the click to the open in the app. The click is recorded on the server and the arrival in the app; the difference between the two is the broken link.

  • Click: The redirect server records the link ID and channel.
  • Arrival: When the app opens the target screen, it sends an event with the same ID.
  • Completion: The real action at the target (approval, payment) is recorded as a separate event.

Cookies, device identifiers and measurement consent are questions for your legal counsel; measure only users who have consented and with the minimum data. We discussed behavior event design in our customer journey guide.

How Do You Build the Test Matrix?

Deep links are among the most skipped features in testing because there are so many states. The states are: installed and signed in, installed and signed out, not installed. There is no "not installed and signed in", so there are three states. These multiply by two platforms and three versions (oldest supported, middle, newest).

DimensionValuesCount
StateInstalled + signed in, installed + signed out, not installed3
PlatformTwo mobile platforms2
VersionOldest, middle, newest3
Combinations3 × 2 × 318
Target typeOrder, invoice, approval, unauthorized target4
Scenarios18 × 472

If each scenario takes about 5 minutes by hand, 72 × 5 = 360 minutes, or 6 hours. Turn the mapping table into automated tests, and by hand check only a few representative targets on real devices in each version. Do not forget the offline case: what happens when a link opens without a network is covered in our offline-first app guide.

Broken-link rate = clicks that did not reach the target ÷ all clicks. The "target" is the correct screen for an installed user and the correct fallback page for a user without the app. In an illustrative measurement, 10,000 clicks break down like this:

GroupBeforeAfter
Installed (7,000): correct target6,440 (92.0%)6,860 (98.0%)
Installed: opened in browser350 (5.0%)100
Installed: stayed on home screen210 (3.0%)40
Not installed (3,000): correct fallback page2,700 (90.0%)2,940 (98.0%)
Not installed: dead end30060
Broken total860 = 8.6%200 = 2.0%

Before: 350 + 210 + 300 = 860 ÷ 10,000 = 8.6%. After: 100 + 40 + 60 = 200 ÷ 10,000 = 2.0%. The difference is 660 clicks; in other words, out of 10,000 clicks, 660 people now reach the right place. The measures to track are the broken-link rate (target below 2%), the rate by channel, the rate by version, and the post-install arrival rate for deferred links.

Let us calculate on 20,000 clicks a month; the measurement was for 10,000 clicks, so it is doubled.

  • Broken-link gain: 660 × 2 = 1,320 clicks now reach the right target.
  • Deferred-link gain: Of the 3,000 users without the app, 900 go to the store (30%) and 360 install (40%). Without deferred linking, if post-install arrival at the target is 50%, that is 180; with it, at 90%, it is 324; a difference of 144. At 20,000 clicks a month, 288 people.
  • Value: Searching for the target or wasting time on the wrong screen costs 2 minutes per click; at an hourly cost of ₺300 a minute is ₺5, so ₺10 per click.

Monthly gain: (1,320 + 288) × ₺10 = 1,608 × ₺10 = ₺16,080. With ₺2,000 a month for monitoring and maintenance, net is ₺14,080. Setup of 14 person-days × ₺9,000 = ₺126,000: payback is ₺126,000 ÷ ₺14,080 ≈ 8.9 months. If the gain halves, net is ₺8,040 − ₺2,000 = ₺6,040 and payback is ₺126,000 ÷ ₺6,040 ≈ 20.9 months. With low click volume the investment is slower to pay back.

Six steps of deep link setup: mapping table, domain verification, fallback, post-login redirect, security and testing, measurement
The six steps of deep link setup.
  1. Mapping table: Write down targets, web paths, screens, sign-in and permission rules.
  2. Domain verification: Link your domain to the app on both platforms; the details are in the official documentation.
  3. Fallback path: Web equivalent if the app is missing, store page if there is none.
  4. Post-login redirect: Store the target temporarily, apply it once, limit its lifetime.
  5. Security and testing: Run the 72-scenario matrix for parameter format, open redirects and target permission.
  6. Measurement: Track click, arrival and completion events by channel; the broken-link target is 2%.
  • Using only scheme links: Users without the app see an error.
  • Skipping the fallback: When the app cannot open, an empty page appears.
  • Leaving permission to the link: "Whoever knows the number sees it" leaks data.
  • Losing the target after sign-in: The user lands on the home screen and the link did not work.
  • Ignoring old versions: A new path goes to the home screen in an old app.
  • Not measuring: Without a broken-link rate, the problem is learned from user complaints.
We recommend reading: How to manage mobile app versions and forced updates
We recommend reading: How to design mobile push notifications

Mobile Apps and Integration With İnovabil

At İnovabil our focus is building bespoke software from scratch: custom software, ERP, CRM, e-commerce, web, mobile and integration. A deep link is where the mobile app, the web and the notification channels work together, so the target list, sign-in and permission rules should be settled in writing during requirements.

We built CRM, purchasing and mobile for Avcılar İnşaat; a purchasing system for İZBAN; logistics and shipment planning with wholesale order management for Karyak; and warehouse management plus a complaint and support management system for Sleepy. Send us a short summary of your app's link targets and user roles, and we will produce a written mapping table together.

We recommend reading: Our software development process: from analysis to release

Frequently Asked Questions

What is a deep link?

A link that opens a specific screen of an app, such as a single order, instead of its home screen. The kind that opens an installed app through domain verification is called a universal link.

What is the difference between a deep link and a universal link?

Deep link is the general concept. A scheme link is an app-specific address prefix and fails if the app is missing. A universal link is an https address on your own domain; it opens the app if installed and the web page if not.

What should a link do when the app is not installed?

It should open the web equivalent of the same target, or show the store page if there is none. To carry the target through an install, use a deferred deep link, and fall back to the home screen when the match is ambiguous.

What should be done for deep link security?

Do not trust the link's parameters, limit redirects to allowed paths, check permission on the server at the target, and keep personal data and session data out of links.

How can you tell whether deep links are broken?

Broken-link rate = clicks that did not reach the target ÷ all clicks. In the illustrative example it was 860 ÷ 10,000 = 8.6% and fell to 200 ÷ 10,000 = 2.0% after fixes. Track it by channel and by version.

Let's talk about your project

Tell us briefly about the software you have in mind; we'll listen and prepare a tailored roadmap and proposal.

Get a quote