Here's a quick snippet for you that _should_ work: ```ts export default { async fetch(request: Request) { if (new URL(request).pathname === '/app') { const ua = request.headers.get('user-agent') if (ua.toLowerCase().includes('android')) { return Response.redirect(playstoreUrl, 301) } else { return Response.redirect(appstoreUrl, 301) } } else { // serve a 404, your origin, or something else } } ```