designwithfocus

Mobile & app development

What Is Deep Linking? Opening One Screen From a URL

By Design With Focus Team 7 min read
A phone opening one product screen from a tapped web address

Short answer

A deep link opens a specific screen in an app from a URI. Android routes it with an intent filter. Apple universal links launch the app with an NSUserActivity. A normal URL stays in the browser when the app is not verified for that domain. The Android and Apple pages used here do not define a deferred deep link.

Last verified against the sources listed below.

Key takeaways

  • Android calls deep linking a system capability on all versions, using intents and a matching filter in the manifest.
  • Custom schemes such as example://products/123 are not ordinary web links and can still show a chooser.
  • App Links, since Android 6.0 (API 23), are verified http or https links that skip the chooser.
  • From Android 12 (API 31), an unverified web intent opens in the default browser.
  • An Apple universal link delivers NSUserActivityTypeBrowsingWeb and an HTTP or HTTPS webpageURL.
  • Apple says to validate URL parameters and not to let the link delete content or read sensitive user data.

What is deep linking, on Android’s documentation, is a way to open your app on one piece of content from a browser, a notification, or another app. Android’s deep-link guide calls it a general system capability, supported on all versions and all devices, built on intents.

Apple’s version for a website you own is a universal link. The system launches the app and hands it the URL. A normal URL, with no app claim behind it, stays a browser address. The pages opened for this guide do not define a deferred deep link, so that term stays out.

A normal URL is an address. The URL standard defines URLs, domains, and IP addresses. MDN’s URL interface parses, builds, and encodes that string. Nothing in those two pages opens an app.

A deep link is the same kind of string plus a claim from an installed app. Android apps declare a matching intent filter, and a tap fires an intent the system tries to route. Apple universal links are web URLs the app has associated with itself, so the address is ordinary and the handoff is the extra part.

That split matters for mobile app development. The screen you want is not “open the app.” It is “open this item.” Android’s guide says the link should take people directly to the content, without prompts, interstitial pages, or logins. Seeing the content even on a first open is the documented expectation. A later prompt, or a prompt when they open the app from the launcher, is allowed.

How does Android choose an app?

Android does not promise your filter wins. The guide lists three steps, in order: the user’s default app for that URI, then the only app that can handle it, then a disambiguation dialog so the person can pick.

There are three kinds of deep link on that page.

  • Custom deep links use a scheme you invent, such as example://products/123. They suit links you control. They are not standard web links, and another app can register the same scheme and trigger the chooser.
  • Web links use http and https. They are ordinary URLs. On Android 12 and higher they are likely to open in the browser rather than your app.
  • App Links have existed since Android 6.0, API level 23. They are verified web links. You prove you own the domain. After that, the system routes the domain to your app and skips the chooser.

Starting in Android 12, API level 31, a generic web intent reaches your activity only if the app is approved for that domain. If it is not, the intent goes to the default browser. Verification is the difference between a web link and an App Link, not a different spelling of the URL.

How do you declare the Android filter?

The filter needs three pieces the guide names. The action is android.intent.action.VIEW, so the filter can be reached from Google Search, and the BROWSABLE category is required for a browser click to resolve to your app. The DEFAULT category lets the app answer an implicit intent, and without it the activity starts only if the intent names your component.

Each data element needs at least android:scheme. Add android:host and a path when you want one screen rather than the whole site. The guide’s pathPrefix example is /gizmos, and it notes that the leading slash is required. The sample URIs are example://gizmos and http://www.example.com/gizmos.

Do not stack unrelated scheme and host pairs in one filter. The guide shows that https with www.example.com plus app with open.my.app in the same filter also matches app://www.example.com and https://open.my.app, because the attributes are combined. Separate filters when the pairs must stay separate.

Link kind Scheme Who opens it Chooser
Normal URL, no app claim http or https Browser No app in the decision
Custom deep link Your scheme, such as example An app whose filter matches Possible, if another app registered it
Web link, not verified http or https Browser on Android 12 and higher The older behavior could show a dialog
App Link http or https, verified Your app, from Android 6.0 Skipped after verification
Universal link http or https, associated The Apple app Not the Android chooser

In the activity, read intent.action and intent.data, usually in onCreate or onStart. The guide’s test command is adb shell am start with action android.intent.action.VIEW and the URI. From Android 17, --debug-link on am start reports how the system resolved the URL.

Apple’s guide says a universal link launches the app and delivers an NSUserActivity. You handle it when activityType is NSUserActivityTypeBrowsingWeb. The webpageURL is the HTTP or HTTPS URL. Parse it with NSURLComponents, and check the path and query before you act.

The guide’s warning is specific: treat the link as an attack path, validate every parameter, and drop malformed URLs. Limit actions to ones that do not risk the person’s data, and do not let a universal link delete content or read sensitive information directly. Tests should include bad URLs, not only the happy path.

If the app uses Scenes and is not running, the link arrives in scene(_:willConnectTo:options:). If the app is running or suspended, it arrives in scene(_:continue:). The same activity type is what the macOS, iOS, tvOS, and watchOS samples check. On watchOS, if a companion app is not installed, the system tells the person to view the URL on their iPhone.

The association itself is a separate step the guide points at: a two-way link between the app and the website, and a list of the URLs the app handles. This page does not invent the file name or the server path for that association. Follow the “Supporting associated domains” page Apple points to when you set that up.

What should the screen do after it opens?

Open the content the URI named. Android says to skip prompts, interstitials, and logins on that first landing, and to follow the platform’s back navigation so the stack matches what people expect after entering through a link.

Apple says the activity’s URL is the source of truth for the path and the query. The sample looks for albumname and index and returns without acting if either is missing. That is a pattern, not a required query string. Your screen should refuse a URL that does not contain the parts you documented.

The icon people see on the home screen is not part of the link. An Android app icon is the launcher image, generated separately from the intent filter. The filter decides which activity runs. The icon does not.

A link that only scrolls a marketing page is still web design. It becomes a deep link when an installed app has claimed that URI and opens one screen from it. Android does that with a filter and, for your own domain, with verification, while Apple does it with a universal link and an NSUserActivity. Neither document opened here describes a deferred handoff that installs the app first.

Frequently asked questions

Is a deep link just a long URL?

A URL is the address. The WHATWG URL standard defines URLs, domains, and IP addresses, and MDN's URL interface parses that string. A deep link is what the operating system does with a URI when an app has claimed it. On Android that claim is an intent filter. On Apple platforms the claim is a universal link association. Without the claim, the same string is an ordinary address and the browser handles it.

What is an Android App Link?

Android's deep-link page lists App Links as the third type, available since Android 6.0, API level 23. They are ordinary web links you verify by proving you own the domain. After verification, the system routes that domain to your app and skips the disambiguation dialog. A custom scheme is a different type. A plain web link, on Android 12 and higher, is likely to stay in the browser unless it is a verified App Link.

What does the app receive on iOS?

Apple's universal-link guide says the system launches the app and sends an NSUserActivity. You respond when activityType is NSUserActivityTypeBrowsingWeb. The webpageURL property holds the web address the person opened. If the app uses Scenes, a cold start delivers the link to scene willConnect, and a tap while the app is running or suspended delivers it to scene continue. The guide shows the same activity type on macOS, iOS, tvOS, and watchOS.

Why would a link open the browser instead of the app?

On Android 12, API level 31, a generic web intent opens your activity only if the app is approved for that domain. Otherwise it goes to the default browser. Even with a matching filter, Android may open the user's default app, the only app that can handle the URI, or a disambiguation dialog. Verification is what removes that dialog for your own domain. A custom scheme can still show the dialog if another app registered the same scheme.

Do these docs define a deferred deep link?

No. The Android deep-link page and Apple's universal-link page describe what happens when the app is installed and has claimed the URI. They do not define a link that waits, installs the app, and then opens the screen. This guide does not add that behavior. If the app is missing, Android's routing falls through to a browser or a chooser, and Apple's watchOS note says the system can tell the person to view the URL on their iPhone.

Sources