Universal Links are ordinary HTTPS web addresses that Apple platforms open directly inside a matching installed app instead of in Safari, after the operating system has verified that the app and the website belong to the same owner. In app development for mobile platforms, they are Apple’s standard mechanism for secure deep linking on iOS, iPadOS, macOS and related systems, introduced with iOS 9 in 2015.
The key property is a graceful fallback: one URL works everywhere. If the app is installed, the link opens the relevant screen in the app; if it is not, the same link simply loads the web page. This replaces fragile custom URL schemes and makes Universal Links the iOS counterpart of Android App Links.
How Universal Links verify app ownership
Universal Links rely on two-way association between an app and a domain, which prevents unrelated apps from hijacking a website’s links. The app declares the domains it claims, and each domain publishes a file confirming which apps may handle its URLs.
On the app side, developers add the Associated Domains entitlement with entries such as applinks:example.com. On the web side, the domain serves an apple-app-site-association file, often abbreviated AASA, at /.well-known/apple-app-site-association over HTTPS, without redirects and without a file extension.
Since iOS 14, devices usually fetch the AASA file through an Apple content delivery network rather than directly from the developer’s server. The file is cached, so changes can take hours or longer to reach users. During development, an alternate mode in the entitlement lets devices bypass the cache.
The table below lists the components that must line up for verification to succeed.
| Component | Where it lives | Purpose |
|---|---|---|
| Associated Domains entitlement | App project and provisioning profile | Declares which domains the app claims |
| AASA file | Web server, well-known path | Lists app identifiers and allowed paths |
| App identifier | Inside the AASA file | Team ID plus bundle ID of the app |
| Path rules | The components or paths keys | Include or exclude specific URL patterns |
| Link handler code | App delegate, scene delegate or SwiftUI | Routes the URL to the correct screen |
Handling an incoming link inside the app
When the system decides a tapped link belongs to an app, it launches or foregrounds the app and delivers the URL as an NSUserActivity of the browsing-web type. The app must then parse the URL and navigate to the matching content.
In UIKit, the URL arrives through the continue user activity callbacks of the app delegate or scene delegate. In SwiftUI, the onOpenURL modifier or onContinueUserActivity receives it. A robust implementation uses a central router that maps URL paths to screens, validates parameters and shows a sensible default when content is missing.
Path matching is defined in the AASA file. Modern files use the components syntax, which can match on path, query and fragment and can explicitly exclude patterns, such as account pages that should always stay on the web.
Universal Links compared with other deep linking methods
Universal Links are one of several ways to open content inside a mobile app, and they differ mainly in security, fallback behavior and platform scope. The comparison below places them alongside the most common alternatives in the deep linking landscape.
| Method | Ownership verified | Fallback without app | Platform |
|---|---|---|---|
| Universal Links | Yes, through the AASA file | Opens the website | Apple platforms |
| Android App Links | Yes, through an asset links file | Opens the website | Android |
| Custom URL scheme | No, any app can register it | Error or nothing happens | iOS and Android |
| Deferred deep link | Depends on the provider | Store, then content after install | Cross-platform via services |
| App Clip link | Yes, through associated domains | Lightweight App Clip experience | iOS |
Custom schemes remain useful for app-to-app communication where both sides are controlled, but they should not be the public entry point because another app can claim the same scheme. Deferred deep linking, which preserves context through an install, requires an additional service or attribution layer because Universal Links alone cannot survive the App Store step.
Where Universal Links work and where they do not
Universal Links trigger only in specific contexts, and the rules surprise many teams. The system opens the app when a user taps a link in apps such as Mail, Messages, Notes or many third-party apps that pass links to the system. It does not open the app when a user types or pastes the URL into the Safari address bar.
| Context | Opens app | Reason |
|---|---|---|
| Tap in Messages or Mail | Yes | System link handling applies |
| Tap on a different domain in Safari | Usually | Cross-domain navigation is eligible |
| Tap on the same domain in Safari | No | Same-domain navigation stays on the web |
| URL typed in Safari | No | Treated as explicit web intent |
| Some in-app browsers | Often not | Embedded web views may handle links internally |
| Server-side redirect chain | Often not | Redirects can break link interception |
Users can also opt out per domain. Long-pressing a link and choosing to open it in Safari, or tapping the domain breadcrumb in the app’s status bar, stores a preference that keeps future links on the web until reversed.
Common implementation mistakes
Most Universal Links failures come from small configuration mismatches rather than code errors, and they fail silently because the system simply opens Safari instead.
- Serving the AASA file through a redirect, which the verifier rejects.
- Wrong app identifier, such as a missing or mistyped Team ID prefix.
- Forgetting subdomains, since
www.example.comandexample.comare separate entries. - Expecting instant updates, when the CDN cache delays new path rules.
- Using redirecting tracking links in email campaigns, which often prevents the app from opening.
- No in-app fallback, so unknown paths show a blank screen instead of a useful page.
Testing should cover cold launch and warm launch, fresh installs, multiple domains and the opt-out state. Apple’s diagnostic tools and the device console help confirm whether the association was validated.
A plain-language summary
Universal Links are normal web links that know how to open an app. If you tap a link to a store, a news article or a booking and you have that company’s app, the phone takes you straight to the right page inside the app.
If you do not have the app, nothing breaks: the same link opens the website. The phone only does this after checking that the app and the website really belong together, so a fake app cannot steal the links.
An example from practice
A regional airline sends boarding pass reminders by email with links such as a booking page on its main domain. Before adopting Universal Links, the links opened the mobile website, where passengers had to log in again before seeing their pass.
The mobile team adds the Associated Domains entitlement, publishes an AASA file that includes booking and check-in paths but excludes the password reset pages, and builds a router that opens the matching trip screen. Email tracking redirects are replaced with direct links plus query parameters for campaign attribution.
After release, passengers with the app installed land directly on their boarding pass in one tap, while others still reach the website. Support requests about missing passes drop noticeably during peak travel weeks.