Cloudflare Link Shortener icon

Cloudflare Link Shortener

CRUD de links curtos no Workers KV. Com provisionamento automático: cria namespace, publica Worker de redirect e associa o hostname da Base da URL curta na Cloudflare.

Criar

AI-generated

Summary

Create a short link by storing a slug and its full target URL in a Cloudflare Workers KV namespace, with optional automatic provisioning of necessary Cloudflare infrastructure (KV namespace, Worker script, and DNS configuration).

Inputs

  • Provisionar infra automaticamente — Enable to automatically create or verify the KV namespace, deploy the redirect Worker, and register the base URL hostname on your Cloudflare account. Requires a Cloudflare API Token with permissions for Workers KV, Workers Scripts, and Worker domain creation.
  • Slug (required) — The short path (slug) to serve as the URL suffix, e.g., 'campanha-natal', appearing as /slug on your domain.
  • URL de Destino (required) — The full destination URL where the short link will redirect or proxy to.
  • Comportamento do Link (required) — Select between 'Só Encurtar (Redirect)' for a classic HTTP 302 redirect or 'Mascarar URL (Proxy)' to keep the slug visible with the content proxied via the Worker. Note that proxy mode can cause issues with some sites.
  • Ativo — Set to false to make the short link inactive, causing 404 responses; the record remains stored in KV.

Output shape

a list of created short link records, each including slug, short URL, full target URL, active status, link mode, creation and update timestamps, click count, and Cloudflare API response metadata.

For each input item, returns an object with detailed information about the created short link. Uses Cloudflare Workers KV to store data and optionally auto-provisions required infrastructure for seamless operation.

Links

Discussion