A deep link is any link that opens a specific screen inside an app instead of the app's home screen. Universal Links (iOS) and App Links (Android) are the verified kind: ordinary https:// URLs that the operating system opens in your app only after it confirms, through a file on your website, that you own the domain. Custom URL schemes such as myshop:// are the older, unverified kind, and any app can claim the same scheme.

For most stores and web apps, verified links are the right default. They work in emails, push notifications, social posts and search results, and because they are normal web URLs, they still point to a real page on your website.

This tutorial is for developers and technical store owners. It covers the difference between the three link types, then walks through both association files (apple-app-site-association and assetlinks.json), the app-side settings, hosting rules, caching delays and the problems people hit most often.

Key takeaways

  • Custom URL schemes are not verified: Apple says that if several apps register the same scheme, which app opens is undefined.
  • Universal Links need an apple-app-site-association file at /.well-known/ on each domain, served over HTTPS with a valid certificate and no redirects, plus an applinks: entry in your app's Associated Domains entitlement.
  • Android App Links need an assetlinks.json file at /.well-known/, served as application/json with no redirects, plus an intent filter with autoVerify.
  • If you use Play App Signing, take the SHA-256 fingerprint from Play Console, not from your local keystore; a mismatch is a common reason verification fails.
  • Changes are not instant: Apple's CDN fetches your file within 24 hours, and on Android 15 and later, assetlinks.json changes can take up to seven days to reach devices.

All three open content inside an app. The difference is whether the operating system checks that the app is allowed to handle the link.

Link typeExampleVerified ownershipWhat can go wrong
Custom URL scheme (iOS and Android)myshop://product/123NoAnother app can register the same scheme; the link means nothing to a browser
Plain Android deep link (https, not verified)https://www.example.com/product/123NoAndroid shows a disambiguation dialog, or opens the browser on Android 12+
iOS Universal Linkhttps://www.example.com/product/123Yes, via apple-app-site-associationFile hosting, caching or entitlement mistakes
Android App Linkhttps://www.example.com/product/123Yes, via assetlinks.jsonFingerprint, hosting or propagation mistakes

Google's App Links overview explains that plain deep links are subject to the system disambiguation dialog, while App Links are verified against your website and open your app directly. App Links need Android 6 or later.

Apple's Universal Links documentation makes the security point plainly: only you can store the association file on your server, which secures the link between your website and your app.

Why custom URL schemes are the weaker choice

Custom URL schemes still work, but Apple recommends against relying on them. Its page on defining a custom URL scheme says custom schemes are "an acceptable form of deep linking," but universal links are "strongly recommended."

The reason is ownership. Nothing stops another app from registering myshop://, and Apple states that if multiple apps register the same scheme, the app the system targets is undefined. A link in your order email could, in theory, open someone else's app.

Schemes also fail outside the app. If a customer without your app taps myshop://product/123, there is no web page behind it. A Universal Link or App Link is a normal URL, so it can fall back to your product page.

Schemes still have a place: internal app-to-app hand-offs, or callbacks where you control both sides. For links that customers see, use verified HTTPS links.

What you need before you start

Collect these values first. Every mistake in the troubleshooting table below comes back to one of them.

For iOS:

  • Your Apple Developer Team ID and your app's bundle identifier (together they form the app ID, for example TEAMID.com.example.app)
  • Access to edit the app's Associated Domains entitlement in Xcode, or in the build tool you use
  • The ability to publish a file at https://<your domain>/.well-known/apple-app-site-association

For Android:

  • Your app's package name (for example com.example.app)
  • The SHA-256 fingerprint of the certificate that signs the app users install (see Step 4 for the Play App Signing catch)
  • Access to the app's AndroidManifest.xml
  • The ability to publish a file at https://<your domain>/.well-known/assetlinks.json

For both: a list of the URL paths you want to open in the app (product pages, collections, order status) and every domain those links use. example.com and www.example.com are separate domains for this purpose.

Step 1: Create the apple-app-site-association file

The apple-app-site-association (AASA) file tells iOS which of your apps may open which paths on your domain. It is a JSON file with no file extension.

Here is a minimal example for a shop that wants product and collection pages to open in the app. Replace TEAMID and com.example.app with your own values.

json
{
  "applinks": {
    "details": [
      {
        "appIDs": ["TEAMID.com.example.app"],
        "components": [
          {
            "/": "/products/*",
            "comment": "Open product pages in the app"
          },
          {
            "/": "/collections/*",
            "comment": "Open collection pages in the app"
          }
        ]
      }
    ]
  }
}

A few notes on the structure:

  • applinks is the section for Universal Links. Apple's Associated Domains entitlement reference describes applinks as the service to "use for universal links."
  • appIDs lists the apps allowed to open these paths. If you have both a production and a test app with different bundle IDs, list both.
  • components lists the URL patterns. Start narrow. Opening only product and collection pages in the app is easier to test than claiming every path on the domain.

Apple's Supporting associated domains page documents the full pattern syntax. Check it before you add query-string or fragment matching.

Step 2: Host the AASA file correctly

Most Universal Link failures are hosting problems, not app problems. Apple's Supporting associated domains page sets these rules:

  1. Put the file at https://<fully qualified domain>/.well-known/apple-app-site-association, with no .json extension.
  2. Serve it over https:// with a valid certificate.
  3. Serve it with no redirects. A redirect from example.com to www.example.com, or from HTTP to HTTPS, at that path is enough to break it.
  4. Host a copy on every domain you list in the entitlement.

Since iOS 14 and macOS 11, apps no longer request the file from your server directly. They request it from an Apple-managed content delivery network (CDN), which fetches your file. Apple says its CDN requests the file within 24 hours, and devices check for updates approximately once per week after the app is installed.

In practice, that means a broken file can stay broken on users' devices for a while after you fix it. Validate the file before you ship the app, not after.

Hosting tips by platform (recommendations, not Apple rules):

  • On a CMS or e-commerce platform that does not let you upload to /.well-known/, check whether the platform or a plugin manages this file for you.
  • Behind a CDN or security layer, make sure bot challenges, geo-blocking or login walls do not apply to /.well-known/.
  • Serve the file with a JSON content type as a sensible default, and confirm the response with a validator rather than by opening it in a browser, which can hide redirects.

Step 3: Add the Associated Domains entitlement in the iOS app

The app has to claim the domain too. Without this half, iOS never asks for your AASA file.

In Xcode, add the Associated Domains capability and list one entry per domain. Apple's entitlement reference gives the format as <service>:<fully qualified domain>, so Universal Links entries look like this:

text
applinks:example.com
applinks:www.example.com

Because each entry is a fully qualified domain, list each host your links actually use. If your emails link to www.example.com but the entitlement only lists example.com, those emails will open in Safari.

Your app also needs code that reads the incoming URL and shows the right screen. In a website-based app, that usually means loading the same URL in the app's web view. In a native app, it means mapping the path to a screen. Either way, test a link for every pattern in your components list.

Android's equivalent is the Digital Asset Links file, assetlinks.json. It names your package and the SHA-256 fingerprints of the certificates allowed to sign it.

json
[
  {
    "relation": ["delegate_permission/common.handle_all_urls"],
    "target": {
      "namespace": "android_app",
      "package_name": "com.example.app",
      "sha256_cert_fingerprints": [
        "AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99"
      ]
    }
  }
]

The fingerprint above is a placeholder. Replace it with your real one, and keep package_name exactly as it appears in your app.

Google's assetlinks.json guide sets these hosting rules:

  1. Publish the file at https://<your domain>/.well-known/assetlinks.json.
  2. Serve it over HTTPS with the content type application/json.
  3. Do not redirect it (no 301 or 302).

The Play App Signing catch. If Google Play signs your app (Play App Signing), the fingerprint from your local keystore usually will not match the certificate on users' devices. Google's guide says to copy the ready-made snippet from Play Console under Release > Setup > App signing instead. If you also install test builds signed with your own key, add that fingerprint as a second entry in the sha256_cert_fingerprints array.

Step 5: Add an autoVerify intent filter in the Android app

On the app side, Android needs an intent filter that declares your HTTPS URLs and asks the system to verify them. Google's Add Android App Links guide says autoVerify is required for this.

xml
<activity
    android:name=".MainActivity"
    android:exported="true">
    <intent-filter android:autoVerify="true">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="https" />
        <data android:host="www.example.com" />
        <data android:pathPrefix="/products/" />
    </intent-filter>
</activity>

Replace the host and path with your own. Add a <data android:host> line for each domain you link from, and make sure each of those domains serves its own assetlinks.json.

Verification matters more on newer Android versions. Google's Android 12 behavior changes say an unverified web link "resolves to the user's default browser app." So if verification fails on Android 12 or later, users do not see a choice dialog. They land on your website, and the app never opens.

Neither platform reads your files live. Plan releases around these delays.

PlatformWhat happensSource
iOS 14+ / macOS 11+Apps fetch the AASA file from Apple's CDN, not your serverApple
iOSApple's CDN requests your file within 24 hoursApple
iOSDevices check for updates approximately once per week after installationApple
Android 15+assetlinks.json changes can take up to seven days to reach devicesGoogle

Two practical habits follow from this:

  • Publish and validate both files a few days before you submit a new build that depends on them.
  • When you add new paths later, add them to the files first and to marketing emails or push campaigns afterwards.

Say you run a WooCommerce store at www.example.com selling coffee beans, with product pages under /product/ and an app built from the site. You want three things: a restock push notification that opens the bean's product page in the app, an order email with a product link that opens the app if installed, and the same link opening the product page in a browser for everyone else.

Here is the setup, in order:

  1. List the paths: /product/* and, if you use them, /product-category/*.
  2. Write the AASA file with your app ID and those paths in components, and host it at https://www.example.com/.well-known/apple-app-site-association.
  3. Add applinks:www.example.com to the iOS entitlement.
  4. Copy the assetlinks.json snippet from Play Console's App signing page and host it at https://www.example.com/.well-known/assetlinks.json.
  5. Add an autoVerify intent filter for www.example.com with the /product/ path prefix.
  6. Use the full https://www.example.com/product/... URL in push notifications and emails, never a custom scheme.

If the store also answers on example.com without www, either list and host that domain too, or make sure every link you send uses www. For what to put in those notifications, see our guide to push notifications for e-commerce.

Start with the files, then the app, then time. This table covers the most common causes.

SymptomLikely causeFix
iOS link always opens SafariAASA file redirects, uses HTTP or has an invalid certificateServe it at /.well-known/ over HTTPS, valid certificate, no redirects (Apple)
Works on www but not on the bare domainEntitlement or file only covers one hostAdd applinks: for each fully qualified domain and host the file on each
iOS still uses old paths after a fixApple CDN and device cachingAllow for the CDN's 24-hour fetch and the roughly weekly device check
AASA looks right but nothing opensWrong Team ID or bundle ID in appIDsMatch TEAMID.bundle.id exactly to the build you installed
Android shows a "open with" dialogPlain deep link: missing autoVerify or failed verificationAdd android:autoVerify="true" and fix assetlinks.json (Google)
Android 12+ opens the browserVerification failedCheck fingerprint, package name, content type and redirects (Google)
Works for debug builds, fails for Play installsLocal keystore fingerprint used with Play App SigningCopy the fingerprint from Play Console: Release > Setup > App signing (Google)
Android 15 device ignores a fixed filePropagation delayWait; changes can take up to seven days (Google)
Custom scheme opens the wrong appAnother app registered the same schemeSwitch to Universal Links and App Links (Apple)

Before you dig into app code, run both files through the free deep link validator. It checks redirects, content type, JSON syntax and fingerprints, and compares your AASA with Apple's CDN copy and your assetlinks.json with Google's Digital Asset Links API.

How WebAppStudio handles this

WebAppStudio apps include deep links and universal links as a native feature you switch on from the dashboard, and push notifications open the right product or page in the app. You still need the association files on your own domain, which is where the validator above helps: it generates both apple-app-site-association and assetlinks.json and then checks them. See the full list of native features on the features page.

Frequently asked questions

Universal Links are a type of deep link. "Deep link" covers any link that opens a specific screen in an app, including custom URL schemes; a Universal Link is Apple's verified version that uses a normal HTTPS URL and a file on your domain.

Does the apple-app-site-association file need a .json extension?

No. Apple's documentation gives the path as /.well-known/apple-app-site-association with no extension. The content is still JSON.

Where do I find the SHA-256 fingerprint for assetlinks.json?

If Google Play signs your app, copy it from Play Console under Release > Setup > App signing, where Google provides a ready-made snippet. A fingerprint from your local keystore usually will not match the app users install from Play.

On Android 12 and later, a web link that fails verification opens in the user's default browser. Check that assetlinks.json is served as application/json over HTTPS with no redirects, that the fingerprint and package name match, and, on Android 15 and later, allow up to seven days for changes to arrive.

Not strictly, but they are the most reliable way to make product links in emails, push notifications and social posts open in the app. If you are turning a web app or dashboard into an app, our guide on turning a web app into a mobile app covers deep links alongside the other native features worth adding.

Next step: validate before you submit

Set up both files, host them on every domain you link from, and validate them before you send a build for review, because caching on both platforms makes later fixes slow. Then test one real link per path pattern on a physical iPhone and Android phone.

If you are preparing a first release, our step-by-step guide to publishing an app on Google Play and the App Store covers the rest of the submission checklist.