Resolve a short link and 302-redirect to its destination
Public short-link entry point. Always responds with 302 (never 301 — a 301 would be cached and break tracking). Behavior:
- Captures all 29 ad-platform Click IDs + UTM params + IP/UA/referrer/geo
from the inbound query string and persists attribution asynchronously
(
waitUntil). - Appends
_tl=<shortLinkId>to the destination URL and passes inbound query through, filling default UTM values. - Sets first-party cookies on
Domain=retidal.com(Path=/; SameSite=Lax,Secureon https): visitor cookie (Max-Age 1 year) and session cookie (Max-Age 30 min). Reuses existing cookie values if present.
Attribution query params the caller may pass through on the inbound link are the standard Click IDs (bd_vid, gclid, fbclid, …) and UTM params; they are extracted automatically. _tk/shortLinkCode is NOT used here — that is an event-ingest field for direct-landing (non-redirect) attribution.
Auth: none (public).
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The short-link short code (base62, nanoid).
Responses
Section titled “Responses”Redirect to the resolved destination URL (with _tl appended).
Headers
Section titled “Headers”Destination URL with _tl=<shortLinkId> and passed-through query.
Two cookies — visitor (1y) and session (30m). Multiple Set-Cookie headers are emitted.
Short link does not exist (plain-text body 链接不存在).
Example
链接不存在Short link is paused (链接已暂停) or expired (链接已过期).
Examples
链接已暂停链接已过期