GitHub Pages URL Shortener logo

GitHub Pages URL Shortener

Serverless URL shortener hosted entirely on GitHub Pages

A minimal, free URL shortener that runs on GitHub Pages, using GitHub issues as a lightweight database—no servers, no maintenance, clean short links like ccb.wtf/1.

GitHub Pages URL Shortener banner

Overview

Overview

The GitHub Pages URL Shortener provides a completely serverless way to create short links. By leveraging GitHub Issues as a lightweight, version‑controlled datastore, each issue title stores the destination URL while the issue number becomes the short path (e.g., ccb.wtf/1). The solution runs entirely on static GitHub Pages, requiring no backend infrastructure or ongoing maintenance.

Getting Started

To deploy, fork the repository, enable GitHub Pages on the main branch, and optionally add a CNAME file for a custom domain. Adjust the PATH_SEGMENTS_TO_SKIP and GITHUB_ISSUES_LINK variables in 404.html to match your domain and repository. New short URLs are created by opening an issue whose title contains the full target URL. The built‑in JavaScript fetches the issue via the GitHub API and redirects visitors instantly. While the approach is inexpensive and ideal for personal or low‑traffic projects, it relies on GitHub API rate limits and lacks built‑in analytics, making it less suitable for high‑volume or enterprise scenarios.

Highlights

Zero‑cost hosting on GitHub Pages, no server required
Uses GitHub issues as a simple, version‑controlled datastore
Clean short URLs without hash fragments (e.g., ccb.wtf/1)
Easy customization for personal domains via CNAME and config variables

Pros

  • Free forever on GitHub
  • Fully serverless, minimal maintenance
  • Transparent data stored as GitHub issues (audit trail)
  • Simple setup with only HTML/JS files

Considerations

  • Relies on GitHub API rate limits
  • Not suited for high‑traffic or mission‑critical use
  • URL updates require creating new issues (no edit UI)
  • Hacky implementation may break with GitHub changes

Managed products teams compare with

When teams consider GitHub Pages URL Shortener, these hosted platforms usually appear on the same shortlist.

Bitly logo

Bitly

URL shortening and link management service for creating concise, trackable links with analytics

Cutt.ly logo

Cutt.ly

URL shortener with branded links, QR codes, and analytics

Rebrandly logo

Rebrandly

Branded URL shortener and link management

Looking for a hosted option? These are the services engineering teams benchmark against before choosing open source.

Fit guide

Great for

  • Developers who need quick, low‑cost short links for projects
  • Open‑source documentation sites wanting branded URLs
  • Hobbyists experimenting with serverless patterns
  • Teams already using GitHub for issue tracking

Not ideal when

  • Enterprises requiring SLA guarantees
  • High‑volume URL redirection services
  • Use cases needing analytics or click tracking
  • Environments where reliance on external GitHub API is prohibited

How teams use it

Project documentation linking

Provide concise, memorable links to docs hosted on GitHub Pages

Conference speaker slides

Create short URLs for slide decks that can be shared on social media

Personal portfolio branding

Map custom domain short links to portfolio pages without extra hosting costs

CLI tool integration

Generate short URLs via issue creation for automated release notes

Tech snapshot

HTML100%

Tags

tinyurlself-hostedshortenershorten-urlsgithub-pageurlshortenershorturlserverlessbitlyurl-shortenersurl-shortenershort-url

Frequently asked questions

How does the shortener store URLs?

It stores the target URL as the title of a GitHub issue; the 404.html script fetches the issue via the GitHub API and redirects.

Do I need a server or database?

No, everything runs client‑side on GitHub Pages.

Can I use my own domain?

Yes, by forking the repo, adding a CNAME file, and updating the configuration variables as described.

What are the limitations?

Rate limits on the GitHub API, no built‑in analytics, and the approach is considered hacky—not recommended for production‑critical services.

How do I create a new short link?

Open a new issue in the repository; set the issue title to the full URL you want to shorten. The issue number becomes the short path.

Project at a glance

Dormant
Stars
1,404
Watchers
1,404
Forks
549
LicenseGPL-3.0
Repo age5 years old
Last commit2 years ago
Self-hostingSupported
Primary languageHTML

Last synced 3 hours ago