Shortlink anti-bot yang jaga target URL lo dari crawler dan traffic kotor.

ShortGuard bukan sekadar URL shortener. Ini redirect firewall per-link: bot bisa didecoy atau diblok lebih dulu, sementara visitor manusia tetap diteruskan ke offer atau landing page asli.

engine/runtime.ts
import {  redirect  } from "next/navigation";
import {  engine  } from "@/lib/engine";

export async function GET(req: Request) {
  // Extract host and code
  const url = new URL(req.url);
  const host = req.headers.get("host");
  const code = url.pathname.split("/").pop();

  const target = await engine.resolve(host, code);
  if (target.isMalicious) {
    return new Response("Blocked by ShortGuard", { status: 403 });
  }

  return redirect(target.url);
}

Built for the real job: protect, route, and audit.

Semua komponen dibikin buat kebutuhan inti shortlink antibot: policy per-link, concealment target URL, dan observability buat operator.

Per-link protection

Setiap shortlink punya aturan sendiri: device filter, country filter, fraud check, firewall, bot redirect, dan optional JS challenge.

Stealth control panel

Panel operasional dipisah dari public surface supaya review abuse, domain moderation, dan threat operations nggak kebuka ke visitor biasa.

Redirect firewall engine

Visitor masuk lewat runtime `/r/[code]`, dicek bot/human, lalu diputuskan: allow, challenge, decoy, atau block sebelum target URL asli kelihatan.

What ShortGuard does

Protect the destination before the redirect happens.

Unknown codes bisa disamarkan, bot bisa diarahkan ke URL jebakan, dan semua decision dicatat buat tenant analytics dan superadmin threat operations.

  • Unknown short codes disamarkan ke root redirect agar sistem nggak terekspos
  • Bot redirect fallback per-link untuk protect offer/landing page asli
  • Policy per-link: blocker type, blocker level, device, firewall, fraud, country
  • Dedicated redirect engine path `/r/[code]` dengan allow/challenge/decoy/block
  • Threat snapshots buat histori IP/ASN enrichment yang bisa dipakai ulang
  • Portal tenant + superadmin dipisah supaya ops dan customer UI nggak campur

Built for operators and performance marketers

Protect every campaign link before bots ever see the target.

Buat workspace, pasang domain, atur Smart URL, lalu gunakan analytics dan threat ops buat lihat mana traffic yang valid dan mana yang harus ditahan.