Shlink is a self-hosted URL shortener that serves short links under your own domains. It offers a command line, a REST API and a web client, and collects anonymized visit statistics with geolocation.
Overview
Shlink is a PHP-based URL shortener that you run yourself, so short links are served under your own domains. You can let it generate a unique short code or provide a custom, human-friendly slug for each long URL.
It can be used through a command line tool or a REST API. Both cover mostly the same operations, except that API key management is available only from the command line. A progressive web client is also provided, which can be used directly or hosted yourself, and it can manage several Shlink instances.
Each click on a short URL is recorded as anonymized visit statistics, and the visitor is geolocated. Short URLs can be shared on social networks, by email or in marketing campaigns, and the visit data can then be reviewed.
For deployment, you can download a pre-bundled dist file and run it on a PHP host, or use the official Docker image configured through environment variables. It supports MySQL, MariaDB, PostgreSQL, Microsoft SQL Server and SQLite as databases. It can also integrate with RabbitMQ.
Key features
- Custom domains for short URLs
- Generated short codes or custom slugs
- REST API with API keys
- Command line interface
- Progressive web client for multiple instances
- Anonymized visit tracking with geolocation
- Official Docker image
- Multiple database backends
Use cases
- Serving branded short links under your own domain
- Tracking clicks on marketing campaign links
- Sharing short URLs on social networks or email
- Integrating link shortening into other apps via API
Does the same job as
Shlink doesn't name these products itself, but its own description shows it does the same job.