Source & license
Upstream license: MIT
License TL;DR
You can use it, change it, self-host it and sell it. Keep the original copyright and license notice with copies of the code. You don’t have to publish your changes. The authors don’t promise it will work.
Explain MIT in plain English →Summary of the main license. Separate packages and assets can have different terms.
Inspect repository ↗Read this project’s actual license ↗Repository owner
See the upstream repository for the original creator and contributors.
Maintain this project? Maintainer verification →README badge, corrections or removal →Cloudflare hosting
Free tier eligible within limits
The reviewed Cloudflare deployment is eligible for Free-plan allowances for the stated small workload and feature scope. Usage limits, CPU, required account setup and separate services apply.
Hosting requirements
- Use the reviewed manual Pages/D1 deployment steps and explicitly bind your database as DB; no parsed Wrangler config is claimed.
- Keep dynamic Pages Functions traffic under 100,000 requests/day and 10 ms CPU per invocation, with D1 queries/writes/storage within Free quotas.
- Treat README DROP TABLE statements as first-install schema setup only; preserve existing data when upgrading.
- Custom domain is optional; the Pages hostname avoids a required domain purchase. IP/user-agent fields require an operator retention decision.
- Dynamic Pages Functions requests share the Workers account allowance; only requests that do not invoke Functions count as free unlimited static asset requests.
- D1 Free allowance: 5 million rows read/day, 100,000 rows written/day and 5 GB total storage; unindexed scans and history retention consume quota.
Review findings & limitations
- Original frontend and selected create/redirect handlers were tested in isolated local Pages/D1. This does not verify a fresh production installation or management authentication.
- Manual README explicitly names Pages deployment and DB D1 binding, so topology is documentation-derived.
- MIT copyright x-dr and fork provenance are retained.
- SQL stores IP/user-agent logs and destructive setup statements are disclosed.
- Local testing found duplicate custom-slug reuse fails, generated loopback links omit the port, and unescaped SQL interpolation rejects valid URLs containing apostrophes. Parameterize SQL and fix these branches before exposing this version publicly.
- Pinned runtime source review now includes 3 TS/JS files and recognizes handler/router declarations. This is static source evidence, not verification of running deployment, authentication or external service delivery.
Sources checked 01/10/2026
Repository snapshot: 69d2f32. Hosting eligibility reflects the deployment documentation and listed assumptions.
- bitly ↗
as d.igdud.xyz. 8.Enjoy it. If you like or it helps you, please star it. Thanks. **9.API** #### Shorturl create ```bash # POST /create curl -X POST -H "Content-Type: application/json" -d '{"url":"https://igdu.xyz"}' https://d.igdu.xyz/create # Dedicated slug curl -X POST -H "Content-Type: application/json" -d '{"url":"https://igdu.xyz","slug":"scxs"}' https://d.igdu.xyz/create ``` > response: ```json { "slug": "<slug>", "link": "http://d.igdu.xyz/<slug>" } ```
- short-io ↗
ST -H "Content-Type: application/json" -d '{"url":"https://igdu.xyz"}' https://d.igdu.xyz/create # Dedicated slug curl -X POST -H "Content-Type: application/json" -d '{"url":"https://igdu.xyz","slug":"scxs"}' https://d.igdu.xyz/create ``` > response: ```json { "slug": "<slug>", "link": "http://d.igdu.xyz/<slug>" } ```
- pages ↗
## Projects Introduction **Introduction**: Use Cloudflare Pages to create Shortener of URL **My Demo** : [https://d.igdu.xyz/](https://d.igdu.xyz/); **Original author's Demo** : [https://d.131213.xyz/](https://d.131213.xyz/) ## Installatin: Use Cloudflare pages to deploy ### Steps are as follows 1.Fork this project, name it as you like, such as "Short". I have made some change based on the original project [https://github.com/x-dr/short](https://github.com/x-dr/short), such as adding footer of website an
- d1 ↗
text , `slug` text, `referer` text, `ua` text , `ip` text , `create_time` DATE ); ``` 5.Bind your project with D1 database. In your Workers and pages, choose your forked project Short, click as follow: Setting->->Function->->D1 database bindings->->Edit bingds->->Variable name, You must put DB->->Namespace, put your D1's name, such as Shorturl->->Binding and Done well. 6.Redeploy the project, otherwise you will see the errors. Methods: In your Workers and pages, choose your forked project Short, Deployments, Redeploy the project. 7.If you like, your
- free-tier-eligible ↗
## Projects Introduction **Introduction**: Use Cloudflare Pages to create Shortener of URL **My Demo** : [https://d.igdu.xyz/](https://d.igdu.xyz/); **Original author's Demo** : [https://d.131213.xyz/](https://d.131213.xyz/) ## Installatin: Use Cloudflare pages to deploy ### Steps are as follows 1.Fork this project, name it as you like, such as "Short". I have made some change based on the original project [https://github.com/x-dr/short](https://github.com/x-dr/short), such as adding footer of website an
- free-tier-eligible ↗
s.cloudflare.com/workers/platform/pricing/#how-to-switch-usage-models). ### Static asset requests On both free and paid plans, requests to static assets are free and unlimited. A request is considered static when it does not invoke Functions. Refer to [Functions invocation routes](https://developers.cloudflare.com/pages/functions/routing/#functions-invocation-routes) to learn more about when Functions are invoked. ## Free Plan Requests to your Pages Functions count towards your quota for the Workers Free plan. For example, you could use 50,000 Functions reques
- free-tier-eligible ↗
rs Paid](https://developers.cloudflare.com/workers/platform/pricing/#workers) | | --- | --- | --- | | Rows read | 5 million / day | First 25 billion / month included + $0.001 / million rows | | Rows written | 100,000 / day | First 50 million / month included + $1.00 / million rows | | Storage (per GB stored) | 5 GB (total) | First 5 GB included + $0.75 / GB-mo | Track your D1 usage To accurately track your usage, use the [meta object](https://developers.cloudflare.com/d1/worker-api/return-object/), [GraphQL Analytics API](https://developers.cloudflare.com/d1/obs
- MIT ↗
MIT License Copyright (c) 2023 x-dr Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this
- architecture ↗
text , `slug` text, `referer` text, `ua` text , `ip` text , `create_time` DATE ); ``` 5.Bind your project with D1 database. In your Workers and pages, choose your forked project Short, click as follow: Setting->->Function->->D1 database bindings->->Edit bingds->->Variable name, You must put DB->->Namespace, put your D1's name, such as Shorturl->->Binding and Done well. 6.Redeploy the project, otherwise you will see the errors. Methods: In your Workers and pages, choose your forked project Short, Deployments, Redeploy the project. 7.If you like, your
Locally captured application screenshot · igengdu/short repository contributors; captured locally by Cloudsteading ↗. Uses demonstration data. Local execution does not verify a production Cloudflare deployment.
What we tested locally
Original selected Pages Functions running in local Wrangler 4.145.0/workerd with isolated D1 SQLite; frontend viewed in Codex browser. An empty isolated short-capture-local database initialized using the pinned short.sql; synthetic example.com URLs only. No real links, user credentials or production data.
- Passed: Original frontend creates a sample link. Codex browser submitted a synthetic example.com URL; local D1 stored the link and the interface showed a copied-link result.
- Passed: Stored link redirects through local Pages. HTTP GET at the correct local port returned 302 with the exact synthetic example.com destination.
- Needs a fix: Generated loopback URL retains its port. The source derives origin from protocol and hostname, so the generated URL omitted local port 4339.
- Needs a fix: Existing matching custom slug can be reused. Repeating the same URL and custom slug returned HTTP 500: Cannot access slug2 before initialization.
- Needs a fix: Valid destination with an apostrophe. A normal URL containing an apostrophe returned D1 SQL syntax error because the statement interpolates unescaped user input.
- Not tested: Management and production deployment. Management middleware was excluded; no production deployment, remote database or public traffic was used.
Capture setup and limits
- Selected six original source files are unchanged; management middleware/routes were not installed or exercised.
- Separate temporary project outside the Cloudsteading checkout uses a fake local D1 ID, DB binding and loopback port 4339. No remote bindings or secret files.
- Production Cloudflare deployment, management authentication, public abuse resistance and security fixes remain untested.
- Original create/redirect source interpolates unescaped values into SQL. Parameterized statements and failing branch fixes are needed before exposing this version publicly.
- Returned loopback link drops the port; successful redirect was tested at the actual local server port.
What it can replace
Compare the workflow you need. These mappings describe overlap; full feature parity requires a separate comparison.
Editorial workflow alternative: Creating custom or generated short URLs and resolving redirects; no team, campaign-reporting or enterprise feature parity.
See supporting source ↗Editorial workflow alternative: Personal short-link creation and redirecting through a Pages deployment; branded-domain management and analytics parity are not established.
See supporting source ↗How it works
The shape of Short on Cloudflare, and how it stacks up against the rented tools it replaces.
Architecture
Diagram based on the linked repository documentation. See the sources and hosting assumptions above.
View upstream source ↗Configuration and workflow sources
Reviewed commit 69d2f326d607. This configuration evidence comes from reading source files. Execution checks, when available, appear in the project's runtime review.
Deployment configuration · 0 files
No Wrangler file found in the collected snapshot. The documented architecture above needs separate deployment verification.
Named environments are separate deployments. Bindings are shown only where declared. Configured routes are URL patterns, not verified application endpoints.
Runtime source · handlers, binding usage and workflow steps
Observed TypeScript/JavaScript declarations from Worker entrypoints and resolved relative imports. Calls and workflow steps may run conditionally; their listed order is not a proven end-to-end request flow. Router declarations may be mounted under a prefix or may not be registered. This shows code wiring, not a successful deployment or runtime test. Dynamic wiring, aliases and generated code may not resolve.
- L19 · Cloudflare Pages ALL request handler exported · calls request.headers.get, format, request.json, Response.json, test, first, env.DB.prepare, generateRandomString, run
- L7 · generateRandomString calls (conditional paths may differ): Math.floor, Math.random, characters.charAt
- L19 · onRequest calls (conditional paths may differ): request.headers.get, format, request.json, Response.json, test, first, env.DB.prepare, generateRandomString, run
Environment references: env.DB
- L6 · Cloudflare Pages GET request handler exported · calls request.headers.get, format, first, env.DB.prepare, run, Response.redirect, console.log
- L6 · onRequestGet calls (conditional paths may differ): request.headers.get, format, first, env.DB.prepare, run, Response.redirect, console.log
Environment references: env.DB
- L1 · errorHandling calls (conditional paths may differ): context.next
- L9 · basicAuthentication calls (conditional paths may differ): request.headers.get, Authorization.split, Uint8Array.from, atob, character.charCodeAt, normalize, decode, decoded.indexOf, test, decoded.substring
- L70 · authentication calls (conditional paths may differ): Response.json, context.next, context.request.headers.has, basicAuthentication, UnauthorizedException
Environment references: context.env.IMG · context.env.BASIC_USER · context.env.BASIC_PASS
Build and deployment pipeline · 0 GitHub Actions workflows
Repository CI declarations, separate from runtime request processing. Job dependencies and conditions are shown as written; long commands are shortened with an ellipsis; a workflow file does not prove a recent successful run.
No GitHub Actions workflow was found in the collected tree. Deployment may be manual or configured elsewhere.
Repository README
View original on GitHub ↗Full upstream document by @igengdu · README.md · snapshot 69d2f32
Projects Introduction
Introduction: Use Cloudflare Pages to create Shortener of URL
My Demo : https://d.igdu.xyz/;
Original author's Demo : https://d.131213.xyz/
Installatin: Use Cloudflare pages to deploy
Steps are as follows
1.Fork this project, name it as you like, such as "Short". I have made some change based on the original project https://github.com/x-dr/short, such as adding footer of website and the action after shortening the URL. Thanks for the original project and it's author.
2.Connect this git project with your Cloudflare Pages and deploy your project.
2.1 Creat and login in your Cloudflare account;
2.2 In Workers and Pages, select pages, create a project, connect to git, choose your forked git program.
2.3 Set up builds and deployments, choose the default setting. Waiting Cloudflare's deploying, then it will be ok.
3.Creat database D1 to store the necessary data. Choose D1, create database, give a name as you like for this D1(such as Shorturl) , create and it's ok for D1 with name Shorturl. Refer to D1's create
4.Go to the workers and pages's console to put and execute the SQL commands. Commands are as follow, just copy them and put them to console station to execute them.
DROP TABLE IF EXISTS links;
CREATE TABLE IF NOT EXISTS links (
`id` integer PRIMARY KEY NOT NULL,
`url` text,
`slug` text,
`ua` text,
`ip` text,
`status` int,
`create_time` DATE
);
DROP TABLE IF EXISTS logs;
CREATE TABLE IF NOT EXISTS logs (
`id` integer PRIMARY KEY NOT NULL,
`url` text ,
`slug` text,
`referer` text,
`ua` text ,
`ip` text ,
`create_time` DATE
);
5.Bind your project with D1 database. In your Workers and pages, choose your forked project Short, click as follow:
Setting->->Function->->D1 database bindings->->Edit bingds->->Variable name, You must put DB->->Namespace, put your D1's name, such as Shorturl->->Binding and Done well.
6.Redeploy the project, otherwise you will see the errors. Methods: In your Workers and pages, choose your forked project Short, Deployments, Redeploy the project.
7.If you like, your project could works well with Cloudflare's subdomain, such as short-998.pages.dev. If you want to Custom the project domain, in Cloudflare's forked project,choose the custom domian setting, then bind your domain. Then you could surf your project with your domain, such as d.igdud.xyz.
8.Enjoy it. If you like or it helps you, please star it. Thanks.
9.API
Shorturl create
# POST /create
curl -X POST -H "Content-Type: application/json" -d '{"url":"https://igdu.xyz"}' https://d.igdu.xyz/create
# Dedicated slug
curl -X POST -H "Content-Type: application/json" -d '{"url":"https://igdu.xyz","slug":"scxs"}' https://d.igdu.xyz/create
response:
{
"slug": "<slug>",
"link": "http://d.igdu.xyz/<slug>"
}
Frequently asked about Short
What is Short?+
Short is a self-hosted Bitly/Short.io alternative built on the Cloudflare developer platform. A small D1-backed URL shortener deployed with Cloudflare Pages.
What does Short replace?+
Short is listed as an alternative to Bitly, Short.io. Compare the features and tradeoffs before migrating.
What Cloudflare primitives does Short use?+
Short is built on D1, Pages.
How much does Short cost to run?+
The reviewed Cloudflare deployment is eligible for Free-plan allowances for the stated small workload and feature scope. Usage limits, CPU, required account setup and separate services apply. Use the reviewed manual Pages/D1 deployment steps and explicitly bind your database as DB; no parsed Wrangler config is claimed. Keep dynamic Pages Functions traffic under 100,000 requests/day and 10 ms CPU per invocation, with D1 queries/writes/storage within Free quotas. Treat README DROP TABLE statements as first-install schema setup only; preserve existing data when upgrading. Custom domain is optional; the Pages hostname avoids a required domain purchase. IP/user-agent fields require an operator retention decision. Dynamic Pages Functions requests share the Workers account allowance; only requests that do not invoke Functions count as free unlimited static asset requests. D1 Free allowance: 5 million rows read/day, 100,000 rows written/day and 5 GB total storage; unindexed scans and history retention consume quota. Check current Cloudflare pricing before deploying.
Is Short open source?+
The upstream repository declares the MIT license. Read its terms at https://raw.githubusercontent.com/igengdu/short/69d2f326d607fab831865d4cfe39e71c03e6896a/LICENSE. Source code and contributor credit are available at https://github.com/igengdu/short.
Community rating
No ratings yet. Tried this project? Share your experience.
One rating per verified account. You can change or remove yours. Accounts are email verified; use of the software is self-reported.



Discussion · 0
sign in to comment →