Universal Links are standard web URLs that connect a website to a specific piece of content within a mobile app. When a user clicks a Universal Link, the mobile operating system determines if the corresponding app is installed. If the app is present, it opens the content directly; if not, the link loads the mobile website in a browser.
[Apple introduced Universal Links in iOS 9] (Branch) as a replacement for older, less reliable deep linking methods like custom URI schemes.
What are Universal Links?
In the mobile industry, Universal Links refer to two distinct but related concepts:
- Apple Universal Links: A system technology that allows a single URL to act as both a web link and an app deep link. It eliminates the need for "timer-based" redirects and provides a seamless transition between web and app content.
- Universal Book Links (UBL): A marketing tool used by authors and publishers. These links act as a single gateway that allows readers to choose their favorite digital storefront, such as Amazon, Apple Books, or Barnes & Noble.
Why Universal Links matter
Universal Links improve the user experience by removing friction during the "hand-off" between a browser and a native application.
- Standardized URLs: They use standard http(s):// prefixes, making them indistinguishable from normal web links and compatible with all browsers.
- Improved Conversion: By opening the app directly, you reduce the steps a user must take to complete an action, like purchasing a book or viewing a profile.
- Analytics and Tracking: Platforms like Books2Read allow users to [view stats for Universal Book Links] (Books2Read) to monitor how many readers are clicking through to specific stores.
- Security: Because Universal Links require a two-way association between the app and the website domain, other apps cannot "hijack" your links.
How Universal Links work on iOS
The process moves the "routing logic" away from the browser and into the mobile operating system.
- Registration: The developer registers specific domains in the app's code that the app is allowed to handle.
- Verification: The developer hosts a JSON file, known as an
apple-app-site-association(AASA) file, in a/.well-known/directory on their website. - Installation: When a user installs the app, iOS downloads the AASA file to verify that the website permits the app to open its URLs.
- Execution: When a link is clicked, iOS checks if the app is installed. If yes, the app opens. If no, Safari opens the web version of the URL.
Best practices
Follow these guidelines to ensure links work reliably for both marketing and technical performance.
- Serve over HTTPS: Apple requires the AASA file to be served over a secure connection. Verification will fail on standard HTTP sites.
- Use the "Details" format: For modern implementations, use the JSON format that allows for [multiple appIDs and excluded paths] (Expo). This [details format has been supported since iOS 13] (Expo).
- Implement Smart Banners: If a user does not have the app installed, use an Apple Smart Banner on your mobile site to prompt them to download the app.
- Customize marketing links: When using Universal Book Links, type a custom name for the URL to make it easier to share in marketing materials or at events.
Common mistakes
Many Universal Link failures stem from configuration errors or platform-specific limitations.
- Including the protocol in config: A common error is [including "https://" in the app's associated domains configuration] (Expo). The config should only list the domain name.
- Wrapping links in redirects: Using third-party email service providers for click tracking often breaks Universal Links. If the provider wraps the link in a redirect domain, the mobile OS will not recognize it as a Universal Link.
- Exceeding file size limits: To ensure quick downloads, the uncompressed [AASA file size cannot exceed 128kb] (Expo).
- Social media limitations: Many social apps use internal webviews that intercept clicks. This makes it [impossible to open apps reliably from Facebook as of March 2016] (Branch) without using legacy deep linking workarounds.
Examples
Example scenario (Author Marketing):
An author creates one Universal Book Link for their new ebook. Instead of posting four different links for Amazon, Kobo, Apple, and Barnes & Noble, they post one books2read.com link. When a reader clicks it, they are presented with a list of storefronts where that specific book is available.
Example scenario (E-commerce App):
A retailer sends a promotional text with a link to example.com/products/shoes. If the customer has the store's app installed, the link bypasses Safari and opens the product page directly in the app. If the customer does not have the app, the link opens the shoe page on the mobile website.
Universal Links vs. URI Schemes
| Feature | Universal Links | URI Schemes |
|---|---|---|
| Logic Location | Operating System (iOS) | Browser (Safari) |
| Fallback | Opens website automatically | Requires a timer or manual redirect |
| User Experience | Seamless transition | Often shows "Open in App?" pop-ups |
| Security | High (Domain verification) | Low (Any app can claim a scheme) |
| Setup Complexity | High (Server and App changes) | Low (App changes only) |
FAQ
What happens if a user disables Universal Links? A user can inadvertently disable them by clicking the domain name in the top right corner of the app after opening a link. This forces the device to open that domain in Safari for all future clicks. Re-enabling them is difficult for average users.
Do Universal Links work on Android? Android uses a similar technology called App Links. While they function similarly to Apple's version, they require a different verification file (Digital Asset Links) hosted on the web server.
Why aren't my Universal Links working in my email campaigns? Most email platforms wrap links in their own tracking domains to measure clicks. Because the tracking domain does not match the domain registered in your app, the mobile OS treats it as a standard web link rather than a Universal Link.
Do I need to update my app every time I change my web links? No. Once the association is established, you can change the content on your website or add new store links to a Universal Book Link. The operating system will continue to route those paths to your app based on the wildcards defined in your AASA file.