Dub
With 24,000 GitHub stars and infrastructure processing over 100 million clicks and 2 million links monthly for marketing teams at Twilio, Buffer, Framer, Perplexity, and Vercel, Dub is the most widely adopted open-source link attribution platform — unifying branded short links, real-time conversion analytics, and affiliate programs in a single self-hostable tool. Create short links on custom domains with built-in QR code generation, device and geographic targeting rules, A/B testing for destination URLs, deferred deep linking for mobile apps, and custom social media preview cards. The attribution engine tracks the complete customer journey from first click through lead capture to final sale, calculating lifetime value, retention rates, and multi-touch attribution across campaigns. Real-time analytics visualize clicks, leads, and revenue with filtering by geography, device, browser, referrer, operating system, and UTM parameters — plus an "Ask AI" feature that generates personalized reports from natural language queries. The partner program module enables embedded referral and affiliate programs with custom reward structures, automated payouts, and partner dashboards for product-led growth. Programmatic link creation via native SDKs for TypeScript, Python, Go, PHP, and Ruby supports enterprise-scale campaigns with real-time webhook notifications on link events. Migration assistants import existing links from Bitly, Rebrandly, and Short.io with redirects preserved. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. AGPLv3 licensed.
Shlink
With over 5,100 GitHub stars and eight years of active development since 2016, Shlink has become the definitive self-hosted URL shortener for teams that need unlimited links, full visitor analytics, and complete data ownership without per-link pricing or monthly caps. The PHP backend built on the Mezzio framework with Doctrine ORM serves redirects through any number of custom domains on a single instance, generating unique short codes or accepting custom slugs including multi-segment paths and emoji characters. Every click is tracked with anonymized visitor data including geolocation by country, city, and coordinates, browser and operating system identification, referrer source, and device type classification, all stored in your choice of MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, or SQLite. Dynamic redirect rules route visitors to different destinations based on geolocation, device type, or browser language, enabling targeted campaigns from a single short URL. The REST API exposes every operation with OpenAPI documentation and an interactive sandbox at api-spec.shlink.io, while the CLI provides equivalent functionality for scripting and automation. The official progressive web app at app.shlink.io manages multiple Shlink instances from a single interface with URL creation, tag management, and detailed visit charts. Real-time event integration supports both Mercure and RabbitMQ for webhook-style notifications on new visits. Third-party imports migrate existing short URLs from Bitly and YOURLS with visit history preserved. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. MIT licensed.