One QR Code on a Business Card Sends iPhones to the App Store and Androids to Google Play
QR codes that route to the appropriate app store

When I announced PokerNexus, I mentioned a separate shortlink host for printed links. This post explains what it does: a QR code on a business card encodes a single URL, go.pokernexus.com/app, and a small Hono service reads the User-Agent header to route iPhones to the App Store, Androids to Google Play, and everyone else to the website. It covers bot detection, the iPad problem, 302s, Vary, and query strings.
A wrong answer that lands on the website is still a working page, while a wrong answer that lands in a store is an install prompt for a device that can't run the app.
- classictraffic
I agree with the other commenters that this is a pretty simple engineering problem, but I still enjoyed reading about edge cases the author worked to address (they could have taken the easy road with this but tried not to). I forgot that Safari on iPad doesn't specify iPad in user agent headers
- Tiberium
Is this a whole blog post for a simple backend that just routes based on the User-Agent?
- m4tthumphrey
Err wut... redirecting based on user agents?