What users of hosted shorteners keep running into, and what Shorthop does instead.
What happens elsewhere
With Shorthop
Elsewhere: Links and QR codes stop working when a plan lapses or an account is banned
With Shorthop: Links live in your own Cloudflare account, on your domain. No shortener’s billing sits between you and them.
Elsewhere: Free links get ads, or a page before the destination
With Shorthop: A plain 302 to the destination, after one KV read.
Elsewhere: Click history cut to 30 days on cheaper plans
With Shorthop: Daily statistics stay in your own database until you delete them. Individual clicks are kept for 90 days.
Elsewhere: Exports locked to higher plans
With Shorthop: Links with every setting, statistics and payments as CSV or JSON, or everything as one backup, any time.
Elsewhere: A monthly cap on changing where a link goes
With Shorthop: Change any link whenever you like (Workers Free allows 1,000 saves a day). Every version is kept and can be restored.
Elsewhere: Revenue tracking only on a top plan, or under a commercial license
With Shorthop: Revenue from Stripe, Paddle, Lemon Squeezy, Dodo Payments, Creem, Gumroad, FastSpring and PayPal, matched to the link that brought each buyer. MIT-licensed.
Elsewhere: Priced per seat
With Shorthop: Admins, managers and users with their own permissions, at no cost. Cloudflare Access is free for up to 50 users.
Shorthop is an open-source link shortener that runs as one Cloudflare Worker in your own account. A short link takes someone to your site, and Shorthop follows that visit to the payment it led to. Revenue is broken down by link, channel, campaign and landing page.
QR studio: print it, scans count on their own
Put the link out
Use it in a post, a newsletter or a bio, or print it as a QR code with your colours, a logo and a caption. Scans are counted as their own source, and the destination can change any time without reprinting.
live map: the last 24 hours, to the nearest city
Someone clicks
One KV read, then a plain 302 to the destination. Analytics is written after the response, so it never slows a click down. The click shows up with its country, city, device and source.
path to money: came, acted, paid
They visit your site
One script tag of about 8 KB records visits, pages and goals. Short links to a tracked site carry a signed click token, so each visit is tied to the link that sent it.
/course: 623 clicks, $5,668
They pay
Stripe, Paddle, Lemon Squeezy, Dodo Payments, Creem, Gumroad, FastSpring and PayPal send verified webhooks. Each payment is matched to the visit that led to it, with how sure the match is. A link straight to a checkout is credited too, with no website in between.
Screenshots from local development with made-up sites, links, customers and stats.
Everything else on the board
Smart routing
Rules by device (iPhone and iPad, Android, desktop, other) and by country. First match wins. Split traffic across up to 10 weighted destinations for an A/B test, try it in the simulator, then read the results per rule and variant on the link page.
Links
Custom slugs on several domains, each with its own slugs and stats
Tags, search, expiry and bulk actions
Password-protected links and click limits, counted exactly
Your own social previews for LinkedIn, Slack, X and iMessage
A UTM builder with saved presets
Bio pages
A link can be a link-in-bio page. Its buttons are your own short links, so every tap is counted.
Leaving another shortener
Import from Bitly, Rebrandly, Short.io or Dub by their API or their CSV export. Old click counts are kept. Links on their own domains (bit.ly, rebrand.ly, short.gy, dub.sh) move to yours with the same back-half.
Reports you can send
A live, read-only page for one link, or a campaign report for a tag or a set of links, with revenue if you choose. Add a password or an end date, and revoke it at any time. They never see your login or your destinations.
Website analytics
One script tag, about 8 KB. Visits, sources, goals, funnels, scroll depth and Core Web Vitals from real visits. It works on plain HTML, Next.js, WordPress, Shopify, Webflow, Framer, Wix, Squarespace, Ghost and anything else that lets you add a tag to the page head.
Subscriptions and refunds
MRR, churn, and new against renewal revenue. Refunds and disputes follow their charge. Amounts are converted at the day’s ECB rate.
Keeping links working
Destination checks, with one email after 3 failures in a row
A report of slugs people tried that don’t exist
Retired links that point to a replacement, and your own 404 page
A warning page before destinations Cloudflare flags as malware or phishing
Every change saved as a version you can restore
AI assistants, API and webhooks
Claude Code, Cursor or VS Code can create links and read statistics through the MCP server at /api/mcp, with your API key and its permissions. Or install the skill:
npx skills add jntegz/shorthop
Signed webhooks, personal API keys and an iOS Shortcut too.
When people click
A weekday by hour heatmap in your own time zone, per link and for the whole account, so you know when to post.
People and roles
Add admins, managers and users with Cloudflare Access, each with their own password and the permissions you tick.
No cookies. No IP addresses.
Nothing is stored in the visitor’s browser and no IP addresses are kept. Unique visitors are counted with a daily hash of the IP address, user agent and date, mixed with a secret salt and a random salt for that day.
The daily job deletes each day’s salt once the day is over. After that nobody, the owner included, can work out whose visit a hash was, and hashes can’t be followed across days.
Website analytics are cookieless by default. A site can respect Global Privacy Control and Do Not Track.
Links live on your own short domain, and every number stays in your Cloudflare account. Daily statistics stay in your own D1 database until you delete them, and individual clicks are kept for 90 days.
Download every table as one ZIP whenever you like, or bind an R2 bucket for a copy every week. The code is MIT-licensed.
You need a Cloudflare account (free is fine). For your own short domain, its DNS must be on Cloudflare in the same account. A spare subdomain such as go.example.com works too.
Press the button and sign in to Cloudflare.
Connect GitHub or GitLab. Cloudflare copies Shorthop into a new repository on your account. It can be private.
On the setup page, fill in ADMIN_PASSWORD: a long random password, at least 9 characters. Leave every other field as it is.
Press deploy. Cloudflare creates the KV namespace and the D1 database. Both are free.
Open /_admin/ on your workers.dev address and sign in.
Add your short domain: in your copy of the repository, set SHORT_DOMAINS and the routes line in wrangler.toml, and commit.
You need Node.js 22.12 or newer as well. The wizard asks for your domains, how to protect the admin, your password and how to send email, then deploys and checks the result.
git clone https://github.com/jntegz/shorthop.git
cd shorthop
npm ci
npx wrangler login
npm run setup
What it costs
Usually nothing.
Workers Free covers most personal use:
100,000 requests a day
1,000 link saves a day
10 ms of CPU per request
50 Cloudflare Access users
Workers Paid, $5 a month, raises the limits.
On Free, the daily requests are a hard cap for the whole account: once they are used up, every short link fails until midnight UTC. Add a rate-limiting rule, and choose Paid if your links must not go down.
Questions people pin up
302, not 301: every click still measured
Why a 302 and not a 301?
Browsers keep a 301 forever, so after the first click they would skip Shorthop. A changed target or an expired link would no longer reach those people, and their repeat clicks wouldn’t count. A 302 keeps every link editable and every click measured. Search engines still follow it.
What does it cost?
Usually nothing. A personal shortener fits inside Workers Free: 100,000 requests and 1,000 link saves a day.
Analytics Engine keeps raw clicks for about 90 days. A daily job copies each finished day into D1, where it stays until you delete it.
Can I show a sponsor the clicks?
Yes. Create a shared statistics page on the link’s page and send its address. They see clicks, daily visitors, countries, sources and devices, read-only, without signing in. The destination and any revenue stay private.
Will my Bitly QR codes keep working?
Codes on your own branded domain will. Import the links, point the domain to Shorthop, and the same addresses resolve. Codes that contain a bit.ly address keep pointing at Bitly.