You've shipped your app on both stores. Now you need to put it somewhere: a TikTok bio, a YouTube description, a poster, a podcast ad. And you have two links.

For years the usual answer was Firebase Dynamic Links. We used it for our own apps too, until it shut down in August 2025. If you only used it to send people to the right store, you don't need a heavy replacement. Here's what the job actually involves, how to do it yourself in 15 lines, and the edge cases that bite later.

What a "smart app link" really does

  1. Look at the visitor's device (the User-Agent header).
  2. iPhone or iPad → redirect to the App Store.
  3. Android → redirect to Google Play.
  4. Anything else → your website or a landing page with both store badges.

That's it. No SDK in the app, no deep linking. (Deep linking into the installed app is a different, much harder problem. If you need that, look at Branch or AppsFlyer.)

The 15-line version (Cloudflare Worker)

const IOS = 'https://apps.apple.com/app/id0000000000'; const ANDROID = 'https://play.google.com/store/apps/details?id=com.example.app'; const WEB = 'https://example.com'; export default { fetch(request) { const ua = request.headers.get('user-agent') || ''; let target = WEB; if (/iPhone|iPad|iPod/i.test(ua)) target = IOS; else if (/Android/i.test(ua)) target = ANDROID; return Response.redirect(target, 302); }, }; 

Deploy it on a route like example.com/app and you have a working smart link on the free tier.

The edge cases you'll meet later

Use 302, not 301. Browsers and some apps cache a 301 forever. With 302 you can change where the link goes later, and the link you already printed on 5,000 flyers keeps working.

Link previews. When someone pastes your link into iMessage, WhatsApp, Slack or X, a bot fetches it to build a preview. Your Worker redirects the bot to a store page or your homepage, and the preview shows whatever that page says, often nothing useful. Detect common preview bots (facebookexternalhit, Twitterbot, Slackbot, WhatsApp, Discordbot, TelegramBot…) and serve them a small HTML page with Open Graph tags: your app name, icon and description.

iPad pretends to be a Mac. Since iPadOS 13, Safari on iPad sends a desktop Mac user agent by default. Server-side, it looks like a computer. That's why the "everything else" fallback should be a page with both store badges, not just your homepage.

Desktop visitors are real visitors. People click your link on a laptop, especially from YouTube and newsletters. Give them a landing page with a QR code so they can scan it with their phone instead of bouncing.

You'll want numbers. Which post worked: TikTok or Instagram? How many clicks went to iOS vs Android? From which countries? A bare redirect tells you nothing. Log the device, the country (request.cf.country on Cloudflare) and the Referer header before redirecting, and do it without slowing the redirect (on Workers, ctx.waitUntil() or a queue).

Bots and scripts inflate clicks. Crawlers, uptime monitors and curl hit your link too. Filter them out of the stats, but still redirect them.

QR codes. For print, generate the QR from the short link, never from a store URL. Then you can change the destination later without reprinting.

Checklist

  • 302 redirects
  • App Store / Google Play / fallback page with both badges and a QR code
  • Open Graph page for preview bots
  • Click logging that doesn't block the redirect
  • Bot filtering in stats
  • Short, readable URL that you control

If you'd rather not maintain it

We hit all of the above while promoting our own apps, so we turned it into a small service: Klinkr. You type your app's name, it finds the app in both stores and gives you one short link with a landing page, a QR code and click analytics. It's free for 3 links.

Here's what it looks like in 30 seconds:

You can try it without signing up: open klinkr.app and type the name of any app.

Either way, DIY or not: please stop putting two links in your bio. 🙂