Open-source alternatives to Bitly
The best open-source alternatives to Bitly are Shlink and YOURLS. Shlink is the one I'd pick: several domains, smart redirects and QR codes through its web client, with visitor data anonymised. YOURLS is the simpler choice if you already have PHP hosting and just want a basic short link tool.
Last reviewed by Rob Sherwood.
At a glance
| Tool | Licence | Self-hosting difficulty | Who it suits | Strengths |
|---|---|---|---|---|
| Shlink | MIT | Easy: a Docker image, using SQLite out of the box or your own database for production | Businesses with branded links across one or more domains, who want decent stats | Multiple domains, visit stats and location, rule-based redirects by device, REST API, command line, web client |
| YOURLS | MIT | Easy: PHP and MySQL on ordinary shared hosting or a small server | Anyone with PHP hosting who wants a simple branded link shortener | Very light to run, your own domain, detailed stats, a large plugin ecosystem |
- Shlink: MIT. Licence checked 31 October 2026.
- YOURLS: MIT. Licence checked 31 October 2026.
Bitly has an odd way of pricing a simple job. The cheapest plan that lets you use your own domain is Growth, at $29 a month on an annual plan. That's $348 a year, about £264, and it comes with a limit of 500 links a month and four months of click data. The free plan gets you 5 links a month, with ads. Core at $10 a month has no custom domain at all.
A short link is, under the bonnet, a tiny database lookup and a redirect. It's about the easiest thing you can self-host, and with no monthly link limits, you could cover this for the price of a small server you may already be paying for.
Shlink
Shlink is a modern self-hosted URL shortener, built on PHP and designed around an API.
- Your own domains, more than one. Handy if you have a main brand and a campaign domain.
- Visit stats. Each click is logged, with location looked up from the GeoLite2 database, and the project describes the stats as anonymised.
- Rule-based redirects. Send people to different pages depending on their device, for example the App Store on iPhones and Google Play on Android.
- Link controls. Links can stop working after a set date or a number of visits.
- Three ways to work. A web client for everyday use, a command line for scripts, and a REST API for connecting to your own systems.
- Easy to run. The Docker image comes with everything, and uses SQLite by default. For production you can point it at MySQL, MariaDB, PostgreSQL or SQL Server.
Two small things to know. The web client is a separate piece: you can use the hosted one at app.shlink.io, which is just a front end, or host it yourself. And QR codes have moved. Shlink used to generate them itself, but version 5 removed that and left it to the web client and Shlink Dashboard. You'll also need a free GeoLite licence key from MaxMind for location data.
YOURLS
YOURLS (Your Own URL Shortener) is the old faithful. It's a set of PHP scripts that has been doing this job for years, and it's still actively maintained.
- Runs on very little. PHP 8.1 or later, MySQL or MariaDB, and Apache with mod_rewrite. Plenty of ordinary hosting will do it.
- Your own domain or subdomain, with stats on your links.
- Plugins for almost anything. The Awesome YOURLS list is the place to look, and it's how you add most extras.
- Simple. You log in, paste a link, choose the short bit and you're done.
The main thing to watch is privacy. By default, YOURLS logs every visit with the visitor's full IP address. That's easily fixed, as community plugins such as yourls-anonymise stop it recording IPs, user agents and referrers, but you do have to know to install one. Plugins are community-written too, so check they work on your version.
Which one?
My pick is Shlink. It handles several domains, it's built for your other systems to talk to and it treats visitor data sensibly from the start. The main drawback is that it needs a little more setting up than YOURLS, with Docker, a separate web client and a GeoLite key.
- Branded links, several domains, API use: Shlink.
- Cheap PHP hosting and a few links: YOURLS.
If you're only making a handful of links a year, honestly, you may not need either. A few redirects on your own website would do it.
What it costs
Bitly
Self-hosted, run for you
- No per-user fees. Adding people doesn't add licence costs.
- Setup: a one-off fee to set it up and move your data across.
- Hosting and care: a fixed monthly fee covering every app on your server.
- I'll quote once I know what you need.
Paid tool prices exclude VAT unless stated.
The UK angle
There's not much to worry about here, and I wouldn't switch from Bitly because of data location. A US-hosted link shortener is fine for most small firms. Still, a few things are worth knowing:
- Click logs can hold personal data. IP addresses are the obvious one. Mention link tracking in your privacy notice, and don't keep more than you need.
- You own the links and the stats. Your click history doesn't vanish after 120 days, as it does on Growth.
- Your domain protects you. If you ever change tool, your short links can move too, because they sit on your domain. That's true on Bitly's custom domains too, as long as you keep hold of the domain.
Honest drawbacks
- If the server goes down, every link goes down. That includes the ones printed on brochures and vans. Bitly has that covered for you. Here, it needs monitoring and backups.
- No built-in campaign platform. Bitly bundles QR code design, landing pages and analytics dashboards. These tools are about links first.
- Basic reporting. You'll see clicks and locations, but not Bitly's slicker campaign reports.
- Abuse is your problem if links are public. Keep creation behind a login or API key, so nobody uses your domain for spam.
- Old bit.ly links stay with Bitly. Anything already out there on a bit.ly address can't be moved to your own server, so plan on keeping those alive or switching gradually.
- You must keep your link domain forever. Let it lapse and every printed link dies.
If you want short links created automatically from your own system, say for every order or invoice, the team at Dev Partners can connect it up through the API.
Sources
Want it set up for you?
I set up open-source tools on a UK server, move your data across and look after it, with no per-user fees.