A short link usually does not compress a long URL into a few characters. It stores a mapping such as K8f2Q → https://example.com/a/very/long/address, then looks up that key when someone visits the short URL.
Redirects do the visible work
The service normally responds with an HTTP redirect such as 301, 302, 307 or 308 plus a Location header. The browser then requests the destination URL.
Why short links can count clicks
Every visit reaches the short-link service before the destination, so it can record time, click count, referrer, browser information or coarse location. Expiry is also easy because the mapping can simply be removed or disabled later.
Why random IDs matter
Sequential IDs are easy to enumerate. Random or encoded identifiers make accidental discovery much harder, although anyone who knows a bearer-style link may still be able to use it.
To inspect an unfamiliar short link before opening it:
To create a short link and QR code:
Short-link management: