Skip to main content
Mobile apps

Deep Links That Work: Setting Up Universal Links and Android App Links

How Universal Links and App Links verify your domain, the two files to host, why links open in the browser, and what replaces Firebase Dynamic Links.

By Jayson Hao9 min read
Tactile paper and metal editorial artwork for Deep Links That Work: Setting Up Universal Links and Android App Links
Editorial field noteITL / № 53

Key takeaways

  • Both platforms verify a file on your own domain: /.well-known/apple-app-site-association for iOS and /.well-known/assetlinks.json for Android, over HTTPS with a valid certificate and no redirects.
  • Since Android 12, a web link opens your app only if the app is verified (or the user approved it) for that domain; otherwise it opens in the default browser.
  • Updates are slow by design: Apple's CDN fetches the file within 24 hours and devices check about once a week, and Android 15 devices can take up to seven days to pick up assetlinks.json changes.
  • Firebase Dynamic Links shut down on August 25, 2025 and its links now return HTTP 404; Google recommends App Links and Universal Links for deep linking into an installed app.

What are Universal Links and Android App Links?

A deep link takes someone from a tap in an email, a text message, a search result or a QR code to a specific screen in your app: an order, a product, a booking, a password reset. The old way was a custom scheme such as myapp://order/123. It only works when the app is installed, any app can claim the same scheme, and on Android it can trigger a dialog asking the user which app to use.

Universal Links on iOS and App Links on Android replace that with normal https URLs on a domain you control. Apple describes the result plainly: one URL works for both your website and your app, and if the person has not installed the app the system opens the URL in their default browser so your website can handle it. Android describes App Links as deep links to your own website that, once verified, open the app immediately without the user choosing from a disambiguation dialog. App Links work on Android 6 and later on devices with Google services.

The key word on both platforms is verification. The operating system will only route a web link to your app after it has confirmed, through a file on your website, that the domain owner authorizes that specific app. When deep links fail, the cause is usually that file, the domain it is on, or the certificate the app was signed with, rather than the app code.

iOS setup: the apple-app-site-association file and the entitlement

On iOS you need two halves that point at each other. In Xcode, add the Associated Domains capability and list each domain as applinks:example.com, with no path, query or trailing slash. On the website, publish a JSON file named apple-app-site-association, without a .json extension, at https://example.com/.well-known/apple-app-site-association. Apple requires HTTPS with a valid certificate and no redirects. Each subdomain, such as www.example.com or shop.example.com, needs its own entitlement entry and serves its own file; a *. prefix in the entitlement matches all subdomains.

Inside the file, the applinks section lists app identifiers in the form TeamID.bundleID and a components array that matches URL paths ("/"), query items ("?") and fragments ("#"). A component can set exclude: true, which is how you keep /help/website/* or a checkout page in the browser while /orders/* opens the app. Rules are read in order, so put exclusions before the broad patterns they carve out of.

Two behaviours surprise teams after launch. First, since iOS 14 devices do not fetch the file from your server; they ask an Apple-managed CDN, which requests your file within 24 hours, and devices check for updates about once a week after installation. A fix to the file is not instant. Second, when someone is already browsing your site in Safari and taps a universal link on the same domain, iOS keeps them in Safari. Only a tap on a link from a different domain, or from another app, opens your app. Testing by tapping links on your own website will make it look broken when it is working as designed.

Android setup: assetlinks.json and autoVerify

On Android, the app side is an intent filter with the VIEW action, the BROWSABLE and DEFAULT categories, the http or https scheme, your host, and android:autoVerify="true". When the app is installed, the system collects every host in those filters and requests https://host/.well-known/assetlinks.json for each one. On Android 11 and lower, the app becomes the default handler only if every host verifies, so one forgotten staging domain in the manifest can break all of them.

The website side is a JSON statement list that names your package and the SHA-256 fingerprints of your signing certificate. Google's requirements: serve it with content-type application/json, over HTTPS even if your intent filters also accept http, with no 301 or 302 redirects, on every domain the app claims, and do not ship test URLs that are only reachable on a VPN.

The fingerprint is the most common trap. If you use Play App Signing, Google re-signs the app, so the fingerprint you get from keytool on your own keystore usually does not match the one on users' devices. Copy the snippet from Play Console under Release > Setup > App signing instead, and list your debug or internal build fingerprints alongside it if those builds also need working links.

Android 15 adds Dynamic App Links: a dynamic_app_link_components section inside assetlinks.json with path, query and fragment matchers and exclusions, so you can change which paths open the app without releasing a new version. Dynamic rules cannot widen the hosts and paths declared in the manifest, malformed rules are discarded in favour of the manifest, and Android 14 and earlier ignore them. Google's recommended pattern is a broad manifest (scheme and domain) with path-level routing on the server.

Why do my deep links open in the browser instead of the app?

Since Android 12, a generic web intent resolves to your app only if the app is approved for that exact domain, either through App Links verification or because the user turned it on in the Open by default settings. Otherwise it goes to the default browser. iOS behaves the same way in practice: no valid association, no app. The causes below cover nearly every case.

  • The file redirects. A CDN or host rule sends /.well-known/ to www, adds a trailing slash, forces a login, or serves a bot challenge. Both platforms reject redirects.
  • The link is on a different domain from the file. A bare domain and www are separate hosts, and so is a marketing link-tracking domain that wraps your URLs. Each host the user taps needs its own file, or the tap should land on a host that has one.
  • The Android fingerprint is wrong, usually because of Play App Signing, or the package name differs between flavours.
  • An unreachable host is listed in the Android manifest, which fails verification for every host on Android 11 and lower.
  • The file was fixed but devices have not refreshed. Apple's CDN and the weekly device check on iOS, and up to seven days on Android 15 or reinstall-only updates on Android 14 and lower, mean old results persist.
  • The test is misleading: tapping a same-domain link inside Safari, or pasting the URL into the address bar, keeps the user in the browser by design.

How to test Universal Links and App Links before release

Test the server first, then the device. A file that returns 200 with the right content type to a plain HTTPS request, from outside your office network, rules out most problems before anyone installs a build.

  • Request both files from outside your network and confirm a 200 response, no redirect, application/json, and valid JSON.
  • On iOS, if the server is not publicly reachable during development, add an alternate mode query string to the entitlement (for example applinks:example.com?mode=developer) so the device bypasses Apple's CDN and reads your server directly.
  • On Android 12 and later, reset and re-run verification with adb shell pm set-app-links --package PACKAGE 0 all, then adb shell pm verify-app-links --re-verify PACKAGE, wait a few minutes, and read the result with adb shell pm get-app-links PACKAGE. Every domain should say verified; none means the check has not finished.
  • Tap real links from the places users will tap them: Mail, Messages, Gmail, a notes app and your email service provider's tracked links, with the app installed and not installed.
  • Treat every incoming URL as untrusted input: validate parameters, show the web fallback for unknown paths, and never let a link perform a destructive action without confirmation.

What replaces Firebase Dynamic Links?

Many apps used Firebase Dynamic Links for short links and deferred deep links. Google shut the service down on August 25, 2025. Every Dynamic Links URL now returns HTTP 404 when clicked, so old QR codes, printed materials and emails that used them are dead links. Search your marketing assets and support articles for them.

Google's guidance splits the replacement by need. If you only need links to open content in an already installed app, use App Links and Universal Links, which is the setup described above and costs nothing beyond hosting two files. If you need full parity, such as carrying a link through an app store install (deferred deep linking) or click attribution, Google points to third-party deep linking providers and notes it has not vetted them. Before paying for one, check whether you actually use those features: many apps only ever needed links into the installed app.

A deep link checklist for your next release

Deep links sit between the web team, the app team and whoever runs marketing email, which is why they break quietly. This is the checklist we use when shipping an app with deep links.

  • Write a URL plan: which paths open the app, which stay on the web (checkout, account deletion, help pages), and the same rule for each language path such as /en/ and /fr/ or /ja/.
  • Make every linked path a real web page, so users without the app, and search engines, land on useful content rather than an error.
  • Exclude /.well-known/ from redirects, authentication, bot challenges and caching rules that change content type.
  • Take Android fingerprints from Play Console and keep one assetlinks.json and one apple-app-site-association per host, in version control.
  • Plan file changes a week ahead of a campaign, because devices refresh slowly.
  • Replace any remaining Firebase Dynamic Links URLs, and add a deep link smoke test to the release checklist.

About the author

Jayson Hao

Founder of Innovation Trigger Lab and a University of Toronto Computer Science graduate with an AI/ML focus. He designs and ships production RAG systems, AI chatbots, web platforms and mobile products.

View profile

Frequently asked questions

What is the difference between a deep link and a Universal Link or App Link?

A deep link is any link into a screen of an app, including custom schemes like myapp://. Universal Links and App Links are deep links that use verified https URLs on your own domain, so they open the app without a chooser and fall back to your website when the app is not installed.

Where do apple-app-site-association and assetlinks.json go?

Both go in the /.well-known/ directory of every domain the app handles, served over HTTPS with no redirects. The Apple file has no file extension, and Google requires assetlinks.json to be served as application/json.

How long does it take for changes to the association files to apply?

On iOS, Apple's CDN requests the file within 24 hours and devices check about once a week. On Android 15 and later it can take up to seven days; on Android 14 and lower the file is usually re-read only when the app is installed or updated.

Do Firebase Dynamic Links still work?

No. The service shut down on August 25, 2025, and its links return HTTP 404. Use App Links and Universal Links for links into an installed app, or a third-party provider if you need deferred deep linking.

Sources and further reading

  1. 1.
    Supporting associated domainsApple Developer Documentation
  2. 2.
  3. 3.
    Configure website associations and dynamic rulesAndroid Developers, November 19, 2026
  4. 4.
    Verify App LinksAndroid Developers, November 19, 2026
  5. 5.
  6. 6.
    Dynamic Links Deprecation FAQFirebase, November 18, 2026