← knowledge.oriz.in

TinyURL

service short-linktinyurlfallbackfreeno-auth

TinyURL

Role

Tier 2 fallback in the family's three-tier URL-shortener stack (see decisions/architecture/url-shortener-mitigation-tiers.md). Tier 1 is the self-hosted s.oriz.in Cloudflare Worker. TinyURL fills two specific gaps:

  1. Cross-domain mints — when the destination is NOT a family URL (e.g. a tweet that points at a third-party article), branding the short link as s.oriz.in/<slug> would mislead. TinyURL's tinyurl.com/<slug> is neutral.
  2. Outage fallback — if s.oriz.in Worker is unreachable (Cloudflare Workers down — historically 4-nines+ uptime, so this is rare), TinyURL keeps the family's mint capability online.

Free tier

Example:

curl 'https://tinyurl.com/api-create.php?url=https%3A%2F%2Fblog.oriz.in%2Fa-post'
# → https://tinyurl.com/2abc34d

The https://tinyurl.com/app/dashboard paid product (custom slugs, analytics, branded domains) is not used by the family — that tier requires a subscription, which violates rules/infrastructure/no-subscriptions.md.

Card / subscription required?

NO. The public api-create.php endpoint is free and key-less. Card-on-file is not requested. No subscription nag.

How the family consumes it

From the api.oriz.in Hono Worker, server-to-server only:

async function tinyUrl(target: string): Promise<string> {
  const r = await fetch(
    `https://tinyurl.com/api-create.php?url=${encodeURIComponent(target)}`,
    { headers: { 'User-Agent': 'oriz-omnipost/1.0' } }
  );
  return (await r.text()).trim();
}

Server-side keeps tinyurl.com out of the family's CSP connect-src on every page that ships the security headers preset.

Alternatives

Swap cost

Low. One helper function in the api.oriz.in Worker. Swapping to is.gd or v.gd is a URL change.

Why this is our pick (for Tier 2)

Cross-refs