Shlink
Shlink is an open source, self-hosted URL shortener — a Bitly alternative that serves short links under your own domains, with a REST API, QR codes, and click analytics you keep on your own server.
What is Shlink?
Shlink is an open source URL shortener you host yourself, serving short links under your own domains instead of a third party’s. It’s built API-first: a PHP REST service and command-line tool at the core, with a separate web client for a point-and-click interface. Every short link comes with click tracking, QR codes, and tags.
What is Shlink best for?
Developers and teams who want branded short links and real click analytics under a domain they control, without per-link pricing or handing visitor data to a SaaS. Its REST API and CLI make it a strong fit when you generate or manage links programmatically — from apps, scripts, or CI.
What can Shlink do?
- Shorten URLs with auto-generated codes or custom (and multi-segment) slugs
- Serve multiple short domains from a single Shlink instance
- Generate a QR code for any short link
- Track visits with geolocation, device, browser, and referrer stats
- Anonymize visitor IP addresses by default for GDPR-friendly analytics
- Redirect dynamically by device, geolocation, or language
- Expire links by date range or maximum visit count
- Tag links to group and filter them in analytics
- Drive everything through a full REST API and CLI, with real-time updates via Mercure or RabbitMQ
- Import existing links from bit.ly and other shorteners
Where does Shlink fall short?
- The server itself has no admin GUI — it’s a REST API plus CLI, and the visual dashboard is a separate web client you host (or point the hosted client at your instance). API keys can only be created from the command line.
- Visit data lives in your own database and grows with traffic, so a high-volume instance on a small VPS can build up a large visits table you’ll eventually need to prune or scale.
- It’s focused on shortening and analytics, not a full marketing suite — there are no link-in-bio landing pages, campaign builders, or team-seat management like Bitly’s and Rebrandly’s higher tiers.
Is Shlink free?
Yes — Shlink is fully free and open source under the MIT license, with no paid edition and no feature gating. You only pay for the server it runs on. There’s no managed cloud to buy; the hosted web client at app.shlink.io is just a UI that talks to your own self-hosted instance.
What does Shlink replace?
Shlink is a self-hosted alternative to Bitly and Rebrandly, and a drop-in for services like TinyURL. It covers the same branded-short-links-plus-analytics job, but the links run on your domain and the click data stays in your database rather than a vendor’s cloud.
FAQ
Is Shlink open source? Yes. Shlink is released under the MIT license — one of the most permissive open source licenses — so you can self-host, modify, and use it freely, including commercially.
Can I self-host Shlink for free? Yes. The software is free; your only cost is the server. It runs from an official Docker image and supports MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, or SQLite for storage.
Is Shlink a good Bitly alternative? For technical users, yes — you get custom domains, QR codes, and detailed analytics that Bitly puts behind paid plans, with no per-link limits. What you give up is Bitly’s zero-setup convenience and its campaign and link-in-bio extras.
What do I need to run Shlink? A server with PHP 8.4 or 8.5 (or the Docker image), a supported database, and a domain pointed at the instance. For the visual dashboard, deploy the separate Shlink web client or use the hosted client against your server.