Short answer: When a user is already on example.com in Safari and taps a link to another page on example.com, iOS keeps them in the browser. Apple treats this as continuing on the website. To send web visitors into the app, link to a different domain or subdomain, such as go.example.com, that has its own entitlement entry and AASA file.
What is happening
Same-domain navigation: a tap on a link that points to the same domain as the page the user is viewing, which iOS keeps in the browser rather than opening as a universal link.
Apple's technote and its "Allowing apps and websites to link to your content" page describe this behaviour. The logic is that someone browsing your site has chosen the web, so links within it continue there.
- The same URL opens the app when tapped from Notes, Messages or another site.
- "Open in app" banners on your site that link to your own domain hit this problem.
Why does this happen?
Universal links are meant for crossing from one context to another, such as from a message or another site into your app. A tap within one domain does not cross that boundary, so iOS treats it as normal web navigation.
A related case: Apple says that if your app opens a universal link to your own website using UIApplication open methods, "the link won't open in your app". Route those links inside the app instead.
How to confirm it
- Tap the link from Notes. If the app opens, the file and entitlement are fine.
- Tap the same link from a page on your own domain. If it stays in Safari, this is same-domain navigation.
- Tap it from a page on a different domain. It should open the app.
How to fix it
- Pick a separate link domain or subdomain, for example
go.example.comor a branded short link domain. - Add it to the Associated Domains entitlement:
applinks:go.example.com. A file onexample.comdoes not cover a specific subdomain likego.example.com. - Serve an AASA file at
https://go.example.com/.well-known/apple-app-site-associationwith a 200 and no redirect. - Point your "open in app" buttons and banners at the link domain, not your main site.
- Have the link domain fall back to the matching page on your main site for users without the app.
- Inside the app, handle your own URLs with in-app routing rather than calling
open.
Entitlement
applinks:example.com
applinks:go.example.com
Web page on example.com
<a href="https://go.example.com/product/1">Open in the app</a>
Hosted options: deep linking providers such as Linkrunner, Branch, Airbridge and Adjust can host a branded link domain with its AASA file for you.
Publish the file on the new domain, check it with curl -I https://links.example.com/.well-known/apple-app-site-association and sudo swcutil dl -d links.example.com, and follow the universal links setup guide for the entitlement.