Skip to content

Latest commit

 

History

History
73 lines (49 loc) · 5.68 KB

README.md

File metadata and controls

73 lines (49 loc) · 5.68 KB

logo

GitHub license Contributor Covenant All Contributors

vanityURLs is a simple solution to deploy a budget-friendly Url Shortener. It runs at scale in your Cloudflare subscription with continuous integration.

If you don't own an a Cloudflare subscription already, you can create your free account today so you can experience everything without spending a dime.

Features:

  • Fully branded internet domain using Cloudflare's DNS & Pages so your links are compact and pretty
  • URL redirection (301, 302, 303, 307 and 308)
  • Advanced redirection with splats (e.g., /news/* → /blog/:splat )
  • Continuous integration managed by Cloudflare Page Engine

My objective is to work at the command line and automate it. So feel free to fork, and customize.

What problem does it solve and why is it useful?

You’ve been there too, a fully branded short URLs is useful but your low volume does not justify a commercial solution. Furthermore, links generated by a free solution will eventually expire and they're not privacy friendly.

This kind of solution is known as TinyURL, tiny url, shorten that long URL, URL Shortening Service, goo.gl, bit.ly, short.io, etc.

It's bullet proof

As long as you secure your Github and Cloudflare accounts with robust authentication, there is not much that can go wrong with such simple solution. It use the products as designed, there is no hack involved.

Setup

  1. Register a tiny internet domain name with your preferred vendor
  2. If you don't own an a Cloudflare subscription already, you need to create a free account
  3. Add the tiny internet domain name to Cloudflare DNS
  4. Follow the instructions to fork the GitHub repository and customize your setup
  5. Use the lnk bash script to shorten, personalize, and share fully branded short URLs with continuous integration on Cloudflare

Limitations

As this code is deployed on Cloudflare Pages, there are some product limits to be aware of:

  • A maximum of 2,000 static redirects and 100 dynamic redirects, for a combined total of 2,100 redirects (source).
  • The Free plan supports up to 500 automated builds per month (source).

Most of these limits wouldn't be reached in general use, but it's good to note for larger-scale deployments.

Platform-wise, the lnk scripts require bash and so are not natively compatible with Windows at this time.

Contributions

Contributions are welcome! We recognize all types based on the all-contributors specification. Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Benoît H. Dicaire
Benoît H. Dicaire

💻 📖 🛡️
Félix Léger
Félix Léger

🤔 📓 📣
Jake Edwards
Jake Edwards

📖
Tiago Serafim
Tiago Serafim

💻

Related

  • dnsConfiguration – Automated DNS configuration with StackOverflow's DNSControl and Git

Licence

vanityURLs is Copyright 2023 Benoît H. Dicaire and licensed under the MIT licence.