A lightning-fast, serverless URL shortener built on Cloudflare Pages and KV. Features an Apple iOS-style Glassmorphism UI, built-in security, role-based administration, and public access toggles.
- Serverless & Free: Runs entirely on Cloudflare Edge (Pages + Functions).
- Auto-i18n: Automatically detects user language (supports English & Persian).
- Security First: Built-in IP rate limiting and bad-word content filtering.
- Admin Dashboard: Full dashboard to view links, track blocked IPs, manage sub-admins, and configure system settings.
- Private Mode: Easily disable public link creation so only authenticated team members can use the service.
- Custom Domain: Automatically supports your own custom domains (e.g.,
link.yourdomain.com).
This project is designed to be deployed directly and automatically via Cloudflare Pages using GitHub integration.
- Click the Fork button at the top right of this page to copy the project to your own GitHub account.
- Log in to your Cloudflare Dashboard.
- Go to Workers & Pages -> KV.
- Click Create a namespace, name it
ILS, and click Add.
- Go to Workers & Pages -> Overview and click Create application.
- Select the Pages tab and click Connect to Git.
- Select your forked repository and click Begin setup.
- In the setup page, leave Framework preset as
None. - Ensure the Build command and Build output directory are completely empty.
- Click Save and Deploy. (Wait for the initial build to finish, then click Continue to project).
- Go to your Pages project Settings.
- Navigate to Functions -> KV namespace bindings.
- Variable name:
ILS - KV namespace: Select the KV you created in Step 2.
- Variable name:
- Navigate to Environment variables (under Settings). Add a new variable:
- Variable name:
MASTER_KEY - Value: Enter a strong, secret password or UUID. (Click Encrypt to hide it).
- Variable name:
- Important: Go back to the Deployments tab and click Retry deployment to apply these database variables.
For enterprise-grade security, you can connect the system to Google's threat database to automatically block malware and phishing links.
- Go to the Google Cloud Console.
- Create a new project and enable the Safe Browsing API.
- Generate an API Key.
- Go to your Cloudflare Pages project Settings -> Environment variables.
- Add a new variable:
- Variable name:
SAFE_BROWSING_KEY - Value: Your Google API Key (If you skip this step, the system will seamlessly fall back to its internal ultra-fast Regex filter).
- Variable name:
To add enterprise-grade security to your admin panel without modifying the code:
- In your Cloudflare Dashboard, go to Zero Trust -> Access -> Applications.
- Click Add an application -> Self-hosted.
- Name it "Admin Panel" and set the subdomain to your Pages URL with the path
/dashboard.html. - Under Policies, create a rule (Action: Allow, Include: Emails -> Your Email).
- Save. Anyone accessing the admin panel will now need a One-Time PIN sent to your email!
- Public Interface: Navigate to your Pages domain (e.g.,
your-domain.pages.dev). - Super Admin Dashboard: Navigate to
your-domain.pages.dev/dashboard.htmland log in with yourMASTER_KEY.
MIT License. Free to use, modify, and distribute.