Resources

Deep Linking Best Practices: 8 Tips for iOS and Android Apps

Deep Linking Best Practices: 8 Tips for iOS and Android Apps

The most important deep linking best practices are to use verified links (Universal Links on iOS and App Links on Android), host the association files correctly, always provide a web fallback, and treat every incoming link as untrusted input. Add deferred deep linking for new installs, tag links for attribution, and test each route on real devices before launch. Most broken deep links come from a misconfigured association file, not from the app code itself.

A deep link is only as good as the screen it lands on. When it works, a user taps a link in an email, an ad, or a social post and goes straight to the product, article, or offer inside your app. When it fails, they end up on your home screen, in the App Store, or on a 404 page, and most of them won’t try again.

If you’re building or maintaining a mobile app, these eight practices cover what matters most for both developers and the marketing team that will share those links.

1. Use Universal Links and App Links instead of custom URL schemes

Verified links are the most reliable way to open content inside an app. On iOS, they are called Universal Links. On Android,d they are called App Links. Both work with regular https:// URLs, so the same link opens the app when it’s installed and your website when it isn’t.

Custom URL schemes such as myapp://product/123 still have their uses, but they aren’t tied to a domain you own. On Android, a regular deep link can also trigger the disambiguation dialog, the “Open with” prompt where users choose between several apps. App Links remove that step for links to your own website once Android has verified the association. They are supported on Android 6 and later, on devices with Google services.

2. Host your association files exactly where the OS expects them

Universal Links and App Links only work after the operating system confirms that your app and your domain belong together. That confirmation depends on two small files on your website:

  • iOS: a file named apple-app-site-association (no .json extension), placed at https://yourdomain.com/.well-known/apple-app-site-association.
  • Android: a Digital Asset Links file at https://yourdomain.com/.well-known/assetlinks.json.

According to Apple’s documentation on supporting associated domains, the iOS file must be served over HTTPS with a valid certificate and with no redirects. Every subdomain you use (for example, www. and shop.) needs its own entry in the app’s entitlement and its own file. A redirect from the bare domain to www is one of the most common reasons Universal Links silently stop working.

3. Plan for caching and verification delays

Changes to your association files don’t reach users instantly. Since iOS 14, Apple devices don’t request the apple-app-site-association file from your server directly. They get it from an Apple-managed CDN, which requests the file within 24 hours, and devices check for updates about once a week after the app is installed.

Android works differently depending on the version. The Android Developers guide to verifying App Links explains that on Android 15 and higher, the system re-verifies domains in the background, and changes can take up to seven days to reach all devices. On Android 14 and lower, updates are usually picked up only when the app is installed or updated. In practice, publish the files well before a launch or a campaign, not the same morning.

4. Always give users a web fallback

Every deep link should still lead somewhere useful when the app isn’t installed. Because Universal Links and App Links use standard web URLs, users who don’t have your app get the same content in their browser. That only works if the matching web page actually exists.

Before you share a link, check that the web version of each route loads properly on mobile. A product link that opens the right screen in the app but a 404 in the browser loses every new user who clicks it.

5. Add deferred deep linking for new installs

Deferred deep linking sends a new user to the right content after they install the app, not just to the onboarding screen. Without it, someone who taps a link for a specific product, installs the app, and opens it for the first time sees a generic home screen and has to search for the product again.

This matters more since Firebase Dynamic Links, which many teams used for this, shut down on August 25, 2025. Links created with it now return a 404 error, so if your app still has old Dynamic Links in emails, QR codes, or printed materials, they need replacing. Marketing and product teams don’t always use the same vocabulary here, so a shared reference helps. JotURL, a platform for branded short links and deep links, has a plain-language guide explaining what deep linking is and how standard and deferred links differ, which works well for non-technical stakeholders.

6. Validate every incoming link

Every deep link your app receives should be treated as untrusted input. Apple warns that universal links offer a potential attack vector into your app, so the app should validate all URL parameters, discard malformed URLs, and limit what a link can trigger.

A good rule of thumb: a deep link can open a screen, but it should never delete content, confirm a payment, or expose sensitive account data without the user confirming the action inside the app. Include badly formatted URLs in your test cases, not just the happy path.

7. Tag links so you can measure where users come from

Deep links are also an attribution tool, as long as you tag them consistently. Add UTM parameters or campaign IDs to every link you share, and make sure the app reads and stores those values when it opens. Otherwise, traffic from email, paid social, and partners all shows up as “direct” in your analytics.

Agree on a naming convention with the marketing team before the first campaign (for example, utm_source=newsletter&utm_campaign=spring_sale). Fixing inconsistent tags afterwards is much harder than setting them up right.

8. Test on real devices before every release

Deep links behave differently across operating systems, browsers and apps, so emulators alone aren’t enough. Test each important route on real iOS and Android devices, from the places users will actually tap them: email clients, messaging apps, social apps and the mobile browser.

On Android 12 and later, you can manually trigger domain verification with adb commands and check the result, which makes App Links much easier to debug. Retest after every release that touches routing, navigation, or your website’s URL structure. If you’re planning a new app, it’s worth including deep linking in the scope from the start, along with the other choices covered in our guides to iOS development and Android development.

FAQ

What is the difference between a deep link and a universal link?

A deep link is any link that opens a specific screen inside an app. A universal link is Apple’s verified type of deep link: it uses a regular HTTPS URL linked to your domain, opens the app when it’s installed, and falls back to the website when it isn’t. Android’s equivalent is called an App Link.

Do deep links work if the app is not installed?

Standard deep links don’t work without the app, but Universal Links and App Links fall back to the matching web page. Deferred deep links go a step further: they take the user to the right content in the app after they install it.

Why are my universal links not working?

Universal links usually fail because of the apple-app-site-association file: it’s missing, behind a redirect, served without a valid HTTPS certificate, or not updated yet on Apple’s CDN. A missing subdomain in the app’s Associated Domains entitlement is another common cause.

What replaced Firebase Dynamic Links?

Firebase Dynamic Links shut down on August 25, 2025, and existing links now return a 404 error. Most teams now combine Universal Links and App Links with a third-party deep linking or link management platform to handle deferred deep linking and attribution.

Final thoughts

Deep linking is a small part of an app’s codebase with a big impact on how many users actually reach the content you promote. Get the association files right, keep a web fallback for every route, validate every incoming link, and test on real devices, and your links will keep working long after the campaign that created them.

Bogdan Sandu

Stay sharp. Ship better code.

Every week: one curated article, one tool worth knowing, one tip you can use tomorrow. No noise, no padding.