How I Built a Deep Linking Service for Mobile Apps Using Cloudflare Workers
If you've ever built a mobile app, you know the pain of deep linking. You share a link, the user taps it, and you want them to land on the right screen inside your app -- not the home screen, not the app store listing, the exact content they were looking for.
Simple in theory. A nightmare in practice.
The State of Deep Linking in 2026
Firebase Dynamic Links was the go-to free option for years. Then Google shut it down. Overnight, thousands of apps needed a replacement.
Branch.io is the market leader, but their pricing starts well into the hundreds per month. For an indie developer or early-stage startup, that's a hard sell for what is essentially a redirect service with some fingerprinting logic.
I'm Stefan, an indie developer from Germany, and I decided to build something better. LinkHopp is a deep linking platform that's fast, affordable, and developer-friendly. Here's how it works under the hood.
The Architecture: Edge-First Everything
The core insight is that a deep link redirect is latency-sensitive. The user tapped a link and is waiting. Every millisecond matters.
LinkHopp's redirect logic runs entirely on Cloudflare Workers -- deployed to 300+ edge locations worldwide. When a user clicks a LinkHopp URL:
- The Worker receives the request at the nearest edge location
- Link metadata is fetched from Cloudflare KV (cached at the edge)
- The Worker parses the User-Agent, determines the platform
- The user is redirected to the appropriate destination
No origin server in the critical path. No cold starts. In my benchmarks, resolution typically takes single-digit milliseconds at the edge.
The Hard Part: Deferred Deep Linking
Standard deep linking is straightforward -- if the app is installed, open it with the right parameters. But what about users who don't have the app yet?
Deferred deep linking means: user clicks link -> goes to app store -> installs app -> opens app -> lands on the correct content. The challenge is maintaining context across an app store install, where you lose all URL parameters.
LinkHopp uses a 3-stage matching approach:
Stage 1: Deterministic match. On Android, the Google Play referrer API can pass a click ID through the install. This gives an exact match about 30% of the time. On iOS, this rarely works.
Stage 2: Fuzzy fingerprint. When a user clicks a link, we store a fingerprint (IP hash + User-Agent + screen resolution + locale + timezone) in Cloudflare KV with a 24-hour TTL. When the app opens for the first time, the SDK sends the same signals, and we match against recent clicks. This is the workhorse -- it handles the majority of matches.
Stage 3: Probabilistic fallback. When Stage 2 returns multiple candidates, we use a narrower feature set and confidence scoring to pick the best match.
In my testing, this achieves match rates around 85-90% depending on the traffic mix and platform.
GDPR by Design
All IP addresses are hashed (SHA-256) before storage. Fingerprints auto-delete after 24 hours. There's no persistent user tracking, no cross-app profiles, no data brokering. LinkHopp routes links -- that's it.
Integrating LinkHopp: Flutter SDK
Getting started takes about 5 minutes. Install the package from pub.dev:
# pubspec.yaml
dependencies:
linkhopp: ^1.0.0
Initialize the SDK in your app:
import 'package:linkhopp/linkhopp.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await LinkHopp.init(
apiKey: 'your_api_key',
onDeepLink: (DeepLinkResult result) {
// result.path -> e.g., "/products/42"
// result.params -> {"referrer": "campaign_summer"}
// result.matchType -> MatchType.exact | .fingerprint | .probabilistic
navigateTo(result.path, queryParams: result.params);
},
);
runApp(MyApp());
}
The SDK handles Universal Links (iOS), App Links (Android), and deferred deep link matching automatically. The matchType field tells you how the match was made so you can adjust your UX accordingly -- for example, showing a confirmation for probabilistic matches.
Creating Links via the REST API
You can create deep links programmatically from your backend:
curl -X POST https://linkhopp.com/api/v1/links \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"destination_url": "https://yourapp.com/products/42",
"ios_url": "https://apps.apple.com/app/id123456",
"android_url": "https://play.google.com/store/apps/details?id=com.yourapp",
"campaign": "summer_launch",
"utm_source": "devto",
"utm_medium": "article"
}'
Response:
{
"id": "...",
"short_code": "xK9mQ",
"short_url": "https://linkhopp.com/xK9mQ",
"destination_url": "https://yourapp.com/products/42",
"created_at": "2026-03-28T10:00:00Z"
}
The API also supports A/B test variants, geo-targeted redirects, and QR code generation. Full docs at linkhopp.com/docs.
Honest Comparison: When to Use What
I'm not going to pretend LinkHopp does everything Branch.io does. Branch has been around for over a decade, has hundreds of employees, and offers features like cross-platform attribution, deep integrations with ad networks, and NativeLink technology.
Here's where the two differ:
| Feature | LinkHopp | Branch.io |
|---|---|---|
| Deep linking (iOS + Android) | Yes | Yes |
| Deferred deep linking | Yes | Yes |
| Redirect speed | Single-digit ms (edge) | Varies |
| Flutter SDK | Yes (pub.dev) | Yes |
| React Native SDK | Yes (npm) | Yes |
| A/B Testing | Yes | Yes |
| Geo-Targeting | Yes | Yes |
| QR Codes | Built-in | Built-in |
| Ad network attribution | No | Yes |
| Cross-platform user graphs | No | Yes |
| Free tier | 1,000 clicks/mo | Limited |
| Starting price | $49/mo | Contact sales |
Choose Branch if you need ad network attribution or cross-platform identity graphs.
Choose LinkHopp if you need reliable deep linking, deferred deep links, and analytics at a price that won't eat your runway.
What's Next
I'm actively working on:
- Link previews dashboard -- real-time preview of how your links render on social platforms
- Slack/Discord webhooks -- get notified when links hit milestones
- Self-hosted option -- deploy LinkHopp on your own Cloudflare account
Try It Out
LinkHopp has a free tier with 1,000 clicks per month -- no credit card required. Paid plans start at $49/month.
- Website: linkhopp.com
- Flutter SDK: pub.dev/packages/linkhopp
- React Native SDK: npmjs.com/package/linkhopp-react-native
- API Docs: linkhopp.com/docs
If you have questions about the architecture or want to talk deep linking, drop a comment below. I built this as an indie developer and I'm happy to help anyone working through mobile deep linking challenges.
Top comments (0)