Full Stack Engineer Guide: iOS Universal Links, Android App Links & PWA Routing

When a user taps a shared link in an email, SMS, or WhatsApp message on their smartphone, forcing them into an unauthenticated in-app webview instead of opening your installed native app or Progressive Web App (PWA) destroys user retention and conversion. Conversely, if the user does not have the app installed yet, broken custom URI schemes (like myapp://) trigger ugly browser error dialogs. As a Senior Full Stack Engineer, I implement cryptographically verified iOS Universal Links, Android App Links, and deferred web-to-app routing across Django, Next.js, and Cloudflare/CloudFront CDNs.

1. Serving Cryptographically Verified Domain Association Files

Both Apple (iOS/macOS) and Google (Android) require your HTTPS web server to prove ownership of your domain by serving JSON verification manifests at exact, unredirected paths under /.well-known/ with strict application/json headers:

  • iOS Universal Links (/.well-known/apple-app-site-association): Must be served over HTTPS with status 200 OK (zero 301/302 redirects) so Apple's CDN crawler (AASA-Bot) can verify your TeamID.BundleID and path inclusion/exclusion rules.
  • Android App Links (/.well-known/assetlinks.json): Maps your website origin to your Android package name and the exact SHA-256 signing certificate fingerprint of your Play Store release key.
import json
from django.http import HttpResponse
from django.views.decorators.cache import cache_control

@cache_control(public=True, max_age=3600)
def apple_app_site_association_view(request):
    payload = {
        "applinks": {
            "details": [
                {
                    "appIDs": ["9JA89QQLNQ.com.example.workspace"],
                    "components": [
                        {"/": "/w/*", "comment": "Open workspace links in native app"},
                        {"/": "/invite/*", "comment": "Open invitation links in native app"},
                        {"/": "/api/*", "exclude": True, "comment": "Never intercept API routes"},
                        {"/": "/oauth/*", "exclude": True, "comment": "Keep OAuth callbacks in browser"},
                    ],
                }
            ]
        },
        "webcredentials": {
            "apps": ["9JA89QQLNQ.com.example.workspace"]
        },
    }
    return HttpResponse(
        json.dumps(payload),
        content_type="application/json; charset=utf-8",
    )

2. Preventing Reverse-Proxy & CDN Caching Pitfalls

The most common reason iOS Universal Links fail silently in production is that a CDN or localization middleware intercepts /.well-known/apple-app-site-association and issues a 302 Found redirect to /en-us/.well-known/..., or serves it with Content-Type: text/plain. I configure explicit URL routing bypasses in Django/Next.js and Cloudflare/CloudFront edge rules so verification manifests bypass locale redirects and bot challenges.

3. Hire a Senior Full Stack Engineer for Cross-Platform Web & Mobile Routing

Need to wire seamless iOS Universal Links, Android App Links, or offline-capable PWAs? Explore my Full Stack Engineer Pillar Guide, read my Next.js 15 & Offline-First PWA Architecture, or book a 1-Day Full Stack Sprint.


About the Author — Hire Aldian Fazrihady (Cloud Engineer, GCP Professional Cloud Architect, GCP Professional Data Engineer, Backend, AI & Full Stack Engineer)

Aldian Fazrihady is a Top-Rated Senior Cloud Engineer, GCP Professional Cloud Architect (Google Cloud Certified), GCP Professional Data Engineer (Google Cloud Certified), Backend Engineer (Python, Django, FastAPI, Go, PostgreSQL), AI Application Engineer (LLMs, RAG, MCP, Google ADK, LangGraph), and Full Stack Engineer (React, Next.js, TypeScript) with 15+ years of production software engineering experience.

Hire Aldian Fazrihady on Upwork | Book 1-Day Programming Service ($100 USD / Rp 1.000.000) | View Live AI Portfolio | Send a Direct Message

Related Engineering Articles

Engineering Role Pillar Guides & Category Hubs