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 status200 OK(zero301/302redirects) so Apple's CDN crawler (AASA-Bot) can verify yourTeamID.BundleIDand path inclusion/exclusion rules. - Android App Links (
/.well-known/assetlinks.json): Maps your website origin to your Android package name and the exactSHA-256signing 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.