Appy
← Back to Blog

Complete Guide to Universal Links

Everything you need to know about universal links, deep links, and app links for iOS and Android

October 10, 2025•12 min read•Tutorial

Skip the setup: one link that opens your app or the right store

  • Free plan, no credit card
  • App Store and Google Play fallback
  • Opens your app on Pro
Create my free link

How Universal Links Work

The process involves three key components:

1

Apple App Site Association (AASA) File

A JSON file hosted on your domain at /.well-known/apple-app-site-association that tells iOS which apps can handle your domain.

2

App Configuration

Your app must be configured to handle specific domains and URL patterns in its entitlements (iOS) or intent filters (Android).

3

URL Handling Code

Your app implements code to receive the deep link URL and navigate to the appropriate screen or content.

01 · Your domain

Association file

Tells the OS which apps can handle the domain

/.well-known/apple-app-site-association/.well-known/assetlinks.json

Both sides must agree

The OS matches the file against the app

02 · Your app

App configuration

Entitlements on iOS, intent filters on Android: the domains and paths it handles

applinks:yourdomain.comandroid:autoVerify="true"

03 · Your app

URL handling code

Receives the URL inside the app

The right screen

The three components from the list above: the domain vouches for the app, the app claims the domain, and your code turns the URL into a screen.

iOS Universal Links Implementation

Step 1: Create the AASA File

Create a file called apple-app-site-association (no file extension) with this structure: apple-app-site-association

{
  "applinks": {
    "apps": [],
    "details": [
      {
        "appID": "TEAMID.com.yourcompany.yourapp",
        "paths": [
          "/products/*",
          "/articles/*",
          "/user/*"
        ]
      }
    ]
  }
}
⚠️

Important

The file must be served over HTTPS with a valid SSL certificate. It must also return Content-Type: application/json header.

Step 2: Configure Your iOS App

In Xcode, add the Associated Domains capability with your domain:

applinks:yourdomain.com
applinks:www.yourdomain.com

Step 3: Handle the URL in Your App

// AppDelegate.swift
func application(_ application: UIApplication,
                 continue userActivity: NSUserActivity,
                 restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
    
    guard userActivity.activityType == NSUserActivityTypeBrowsingWeb,
          let url = userActivity.webpageURL else {
        return false
    }
    
    // Handle the URL and navigate to appropriate screen
    handleUniversalLink(url)
    return true
}

Android App Links Implementation

Step 1: Create assetlinks.json

Host this file at https://yourdomain.com/.well-known/assetlinks.json:

[{
  "relation": ["delegate_permission/common.handle_all_urls"],
  "target": {
    "namespace": "android_app",
    "package_name": "com.yourcompany.yourapp",
    "sha256_cert_fingerprints": [
      "XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX"
    ]
  }
}]

Step 2: Update AndroidManifest.xml

<activity android:name=".MainActivity">
    <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="yourdomain.com" />
        <data android:pathPrefix="/products" />
    </intent-filter>
</activity>

Step 3: Handle the Intent

// MainActivity.kt
override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    
    val action = intent.action
    val data = intent.data
    
    if (Intent.ACTION_VIEW == action && data != null) {
        // Handle the deep link
        handleDeepLink(data)
    }
}

Best Practices & Common Pitfalls

Do's

  • ✅ Always use HTTPS for your domain
  • ✅ Test on real devices, not just simulators
  • ✅ Set a website URL for people without the app (the fallback URL)
  • ✅ Add comprehensive analytics tracking
  • ✅ Handle all edge cases gracefully
  • ✅ Keep your AASA/assetlinks files updated

❌Don'ts

  • ❌ Don't use redirects for your AASA/assetlinks files
  • ❌ Don't forget to validate JSON syntax
  • ❌ Don't hardcode app navigation logic
  • ❌ Don't assume the app will always be installed
  • ❌ Don't skip testing on different OS versions

Testing & Debugging

iOS Testing

  • 1. Use Apple's AASA Validator
  • 2. Test links in Notes app, Messages, or Mail
  • 3. Check logs in Xcode Console
  • 4. Verify domain association in Settings → Developer

Android Testing

  • 1. Use adb shell am start -a android.intent.action.VIEW -d "your-url"
  • 2. Test in Chrome, Gmail, and messaging apps
  • 3. Check verification status with adb shell dumpsys package domain-preferred-apps
  • 4. Monitor logcat for errors

Analytics & Attribution

Proper analytics is crucial for understanding how your universal links perform. Track these key metrics:

  • Click-through rates from different channels
  • App open rate vs website visit rate
  • User acquisition cost per channel
  • Conversion rates for deep-linked content
  • Time to first action after deep link
  • Platform-specific performance (iOS vs Android)

Pro Tip

Use a smart link platform like Appy to automatically handle universal links, track analytics, and send people without the app to the store or your website. This saves you weeks of development time and provides enterprise-grade infrastructure.

Try Appy Free

Conclusion

Universal links are essential for modern mobile apps. They provide a seamless user experience, improve attribution, and work reliably across platforms. While implementation requires careful attention to detail, the benefits in user experience and analytics make it worthwhile.

Start with the basics, test thoroughly, and iterate based on real-world performance data. And if you want to skip the complexity, consider using a platform like Appy that handles all of this for you automatically.

Related Appy resources

Explore Appy's tools for universal links, deep links, and QR codes to accelerate mobile app growth.

Continue exploring

Guide
Oct 9, 2026
10 min read

How In-App Browsers Handle Deep Links: Instagram, TikTok, Facebook, Gmail, Telegram and More

Why a link that opens your app from Safari dies inside Instagram: the three kinds of in-app browser, the iOS and Android rules, and what each app documents, from Facebook to Telegram.

in-app browser
universal links
app links
instagram
Read article
Product
Oct 1, 2026
8 min read

Know Which Link Brought Every Install: Appy’s iOS and Android SDK

Appy now follows your links past the app store: installs, in-app events and revenue for every link, QR code and campaign, and new users who open on the right screen.

install attribution
deferred deep linking
install referrer
mobile attribution
Read article
Guide
Aug 14, 2026
11 min read

Deferred Deep Linking Without an SDK: How It Actually Works Under the Hood

You can carry link intent across an app install without embedding an attribution SDK. What actually survives the store boundary on Android and iOS, what breaks, and what each workaround costs in privacy.

deferred deep linking
install referrer
ios
android
Read article

Looking for something else? Browse all topics on the blog.

Skip the complexity. Use Appy.

Appy handles universal links, deep linking, QR codes, and analytics automatically. No coding required.