iOS Universal Links Setup: A Practical, Step-by-Step Guide
iOS universal links setup requires three things working together: an apple-app-site-association (AASA) file hosted on your domain, the Associated Domains capability enabled in your app, and code in your app that handles the incoming URL once iOS hands it off. Get any one of those wrong and the link will quietly fall back to Safari instead of opening your app. This guide walks through each piece in order, plus the troubleshooting steps most tutorials skip.
If you're a creator or affiliate marketer, you probably care about universal links because they're what let a link in a bio, an email, or a text message open directly inside your app instead of a browser tab — no interstitial, no "Open in App?" prompt, just a clean jump straight to the right screen.
What Are Universal Links, Exactly?
Universal links are Apple's native deep linking mechanism. Instead of using a custom scheme like myapp://, a universal link is a regular https:// URL that iOS recognizes as belonging to an app you've installed. Tap it, and iOS opens your app directly at the matching screen. If the app isn't installed, the same URL falls back gracefully to your website — no broken links, no dead ends.
This is different from the older intent:// approach on Android, which explicitly tells the OS which app to try and which fallback URL to use if it's missing. iOS universal links work more implicitly: the operating system checks your domain's AASA file ahead of time and remembers which paths should route to your app.
iOS Universal Links Setup: Step-by-Step
Here's the full ios universal links setup process, in the order Apple expects you to do it.
1. Create the apple-app-site-association file
This is a JSON file (no file extension) that tells iOS which paths on your domain should open your app. A minimal example:
{"applinks":{"apps":[],"details":[{"appID":"TEAMID.com.yourcompany.app","paths":["/product/*","/offer/*"]}]}}
The appID combines your Apple Developer Team ID and your app's bundle identifier. The paths array controls which URL paths should trigger the app — you can use wildcards, or "NOT /excluded/*" to exclude specific routes.
2. Host the AASA file correctly
The file must be served over HTTPS at https://yourdomain.com/.well-known/apple-app-site-association (the root-level location without .well-known also works as a fallback, but .well-known is the current standard). It must be served with a valid SSL certificate, no redirects, and ideally a Content-Type of application/json, though iOS is lenient here. iOS fetches and caches this file when the app is first installed, so changes won't take effect instantly on devices that already have it cached.
3. Enable Associated Domains in your app
In Xcode, add the Associated Domains capability and list your domain with the applinks: prefix, for example applinks:yourdomain.com. This is also where you declare the domain in your app's entitlements file. Without this step, iOS will never check your AASA file for that domain in the first place.
4. Handle the incoming link in code
When a universal link opens your app, iOS calls a delegate method with the full URL (in SwiftUI, this is typically the onOpenURL modifier; in UIKit, it's application(_:continue:restorationHandler:)). Your job is to parse the URL's path and query parameters and route the user to the right in-app screen — a product page, a referral landing screen, a specific video, etc.
5. Test on a real device
Universal links are notoriously unreliable in the iOS Simulator and in Notes app previews. Test by sending yourself the link in Messages or Mail and tapping it on a physical device. You can also force a re-check of your AASA file by deleting and reinstalling the app, which clears iOS's cache of your domain's association data.
Universal Links vs Custom URL Schemes
It's worth understanding why Apple pushes developers toward universal links over the older custom scheme approach (myapp://path):
- Security: Custom schemes can be claimed by any app, creating spoofing risk. Universal links are verified against your domain via the AASA file, so only you can claim them.
- Graceful fallback: A custom scheme link does nothing if the app isn't installed. A universal link opens your website instead.
- Shareability: Universal links are normal, clickable
https://URLs that work in any context — social bios, texts, QR codes — without needing special handling.
Most production deep linking setups today use universal links as the primary mechanism and keep a custom scheme as a secondary fallback for edge cases.
Why Isn't My Universal Link Working?
This is the most common follow-up question after setup, so here are the usual culprits:
- AASA file isn't reachable: Check it loads directly in a browser with no redirects and a valid cert.
- Team ID or bundle ID mismatch: A single typo in the
appIDfield will silently break everything. - iOS cached an old version: Reinstall the app to force a re-fetch, since iOS doesn't poll the AASA file on every link tap.
- The link was tapped inside an in-app browser: This is a big one for creators specifically, and it deserves its own section below.
- Path not included in the paths array: Double-check wildcards and exclusions match the actual URL structure you're sharing.
Universal Links and In-App Browsers
Even a flawless ios universal links setup can fail when someone taps your link inside Instagram, TikTok, or Facebook's built-in browser. These in-app browsers intentionally intercept taps and keep users inside their own webview rather than handing the URL off to iOS the way Safari or Messages would, which means your universal link never gets the chance to trigger. We cover why this happens and how creators work around it in detail in our guide to escaping the Instagram in-app browser.
The short version: if your audience is clicking links from a bio or a story, a correct AASA file and Associated Domains setup alone won't guarantee the app opens — you also need a way to break out of the host app's in-app browser first.
Where a Tool Like Vayda Fits In
This is the gap that smart-link tools exist to close. Vayda sits in front of your universal link and handles the parts iOS's native system doesn't cover on its own: detecting when a click originated inside an in-app browser and routing around it, picking the right destination based on the visitor's device and geography, and preserving your click and attribution tracking the whole way through. It's not the only tool that does this — services like linktw.in offer similar in-app-browser escape and routing — but it's built specifically for creators and affiliates who need one link that behaves correctly across Instagram, TikTok, Facebook, and regular browsers alike, without them having to maintain separate links for each platform.
You still need a correct native universal links setup underneath — Vayda doesn't replace Apple's AASA file or your Associated Domains entitlement, it works alongside them to make sure the click actually reaches your app in the first place.
FAQ: Common Questions About iOS Universal Links Setup
Do universal links require a developer account?
Yes. You need an active Apple Developer account to retrieve your Team ID, which is required inside the apple-app-site-association file's appID field.
Can universal links work without an app installed?
Yes — that's the point of the fallback behavior. If the app isn't installed, tapping the link simply opens the URL in Safari like any normal web link, so there's no broken experience for users who haven't downloaded your app yet.
Why do universal links stop working after an app update?
Usually because the AASA file or Associated Domains entitlement changed without matching updates on both sides, or because iOS hasn't re-fetched the cached AASA file yet. Reinstalling the app forces a fresh fetch.
Are universal links the same as deep links?
Universal links are Apple's specific implementation of deep linking on iOS. "Deep links" is the broader term that also covers Android's intent:// links and custom URL schemes on both platforms.
Getting your ios universal links setup right is foundational — but it's only half the battle if your traffic comes from social platforms with locked-down in-app browsers. Vayda handles the routing, device detection, and in-app browser escape layer on top, so your links just work. Start free with Vayda and turn your next link into one that actually opens.
Vayda turns one link into a smart link that escapes Instagram, TikTok and Facebook webviews and opens the right app — with your tracking intact.
Create a free smart link
Frequently asked questions
Do universal links require a developer account?
Yes, you need an active Apple Developer account to get the Team ID used in your apple-app-site-association file's appID field.
Can universal links work without an app installed?
Yes, if the app isn't installed the link simply opens in Safari, since universal links are designed to fall back gracefully to your website.
Why do universal links stop working after an app update?
Usually a mismatch between the AASA file and the Associated Domains entitlement, or iOS still using a cached version of the old AASA file. Reinstalling the app forces a re-fetch.
Are universal links the same as deep links?
Universal links are Apple's iOS-specific deep linking implementation; deep linking is the broader term covering iOS universal links, Android intent:// links, and custom URL schemes.