Universal links
What is Universal links?
Universal links are an iOS-native deep linking standard that routes users directly to specific in-app content when they tap a link, bypassing the browser or home screen entirely. Introduced in iOS 9, universal links work by associating a domain with an app through a verified configuration file hosted on the domain. When the associated app is installed, iOS opens it directly to the relevant content. When it is not installed, the user is sent to the corresponding web page instead.
How it works
Universal links rely on a verified relationship between a website domain and an iOS app. Apple validates this relationship through a file called the Apple App Site Association (AASA) file, which must be hosted at a specific path on the domain.
Step 1: Host the AASA File
The developer creates an apple-app-site-association JSON file and hosts it at https://[domain]/.well-known/apple-app-site-association. This file declares which app is authorized to handle links for the domain and which URL paths are included.
Step 2: Configure the App
The app must enable the Associated Domains entitlement in Xcode and list the relevant domain using the applinks: prefix. This connects the app to the domain at the system level.
Step 3: Register with Apple
Apple's servers fetch and cache the AASA file when the app is installed or updated. This verification step ensures that only the legitimate app owner can claim a domain, preventing unauthorized apps from intercepting links.
Step 4: Link Resolution at Runtime
When a user taps a universal link, iOS checks whether the associated app is installed. If it is, iOS opens the app and passes the URL so the app can route the user to the correct screen. If the app is not installed, the system falls back to opening the URL in Safari, which typically loads the mobile web version of the content.
Security Model
Universal links are more secure than custom URL schemes because the domain association is cryptographically verified by Apple. A custom URL scheme (e.g., myapp://) can be registered by any app, making it vulnerable to hijacking. Universal links cannot be claimed by an unauthorized app, ensuring links always open in the correct app.
Why it matters
Universal links improve the user experience by removing unnecessary redirects and reducing friction between web and app content. When a user taps a link in an email, SMS, or social feed, a universal link delivers them directly to the relevant in-app screen rather than the app's home screen or a web page. This seamless routing meaningfully improves conversion rates for campaigns that drive users from web or email into an app.
From a measurement perspective, universal links preserve the URL parameters that attribution platforms and mobile measurement partners use to track campaign performance. When link routing is broken or relies on fragile redirect chains, attribution data is lost. Universal links provide a reliable, OS-level routing mechanism that keeps attribution intact.
For re-engagement and remarketing campaigns, universal links ensure that existing users who already have the app installed are taken directly to the promoted content rather than a generic landing page. This reduces drop-off and increases the effectiveness of those campaigns. Airbridge supports universal links as part of its deep link infrastructure, enabling accurate attribution alongside seamless in-app routing.
How to implement universal links on iOS
Implementing universal links requires coordinated configuration on both the server and in the iOS app.
-
Create the AASA file. Define a JSON file specifying your app's bundle ID, Team ID, and the URL paths that should open in the app. Only include paths that map to real in-app content.
-
Host the AASA file correctly. Place the file at https://[yourdomain]/.well-known/apple-app-site-association. It must be served over HTTPS with a valid certificate, with a content type of application/json, and without redirects.
-
Enable Associated Domains in Xcode. In your app's target settings, add the Associated Domains capability. Add each domain in the format applinks:yourdomain.com.
-
Handle incoming URLs in the app. Implement the application(_:continue:restorationHandler:) method in your AppDelegate, or use the onOpenURL modifier in SwiftUI. Parse the incoming URL and route the user to the correct screen.
-
Define a fallback web page. For users without the app installed, the universal link falls back to the web URL. Ensure that page provides a clear prompt to download the app or a smart app banner, so new users can complete the intended flow.
-
Test thoroughly. Use Apple's AASA validation tools and test on a physical device. Note that universal links do not activate when typed directly into Safari's address bar. They must be tapped from another app, such as Messages or Mail.
-
Integrate with your MMP. If you use a mobile measurement partner like Airbridge, configure your universal link domains within the MMP's deep link setup. This ensures attribution parameters are captured and campaign performance is accurately reported alongside the seamless routing universal links provide.
Related concepts
| Term | Relationship | Description |
|---|---|---|
| Android App Links | Contrast | Google's equivalent of universal links for Android, using Digital Asset Links for domain verification. |
| Deferred Deep Linking | See also | Routes users to specific in-app content after a fresh install, handling the case universal links cannot cover. |
| Deep Linking | Parent | The broader category of linking techniques that route users to specific in-app content. |
| Smart App Banner | See also | An Apple-native banner that prompts web visitors to open or download the associated app. |
| Fallback | See also | The destination a universal link routes to when the associated app is not installed on the device. |
Put these concepts into practice
See how Airbridge helps teams implement mobile attribution strategies at scale.