# Shlink / Dub

Short links you host. Shlink is the MIT shortener; Dub is the open-source link attribution platform.

**Replaces:** Bitly

**Tier:** Easy

## Problem

Bitly Core is $10/month billed yearly for 100 links. Shlink is the self-hosted shortener with a REST API and QR codes. Dub is the marketing-attribution shortener you can also self-host.

## Stack

- [Shlink](https://shlink.io) — Self-hosted URL shortener (API, QR, custom domains)
- [Dub](https://dub.co) — Open-source link attribution platform you can self-host

## Estimated SaaS cost saved

| You stop paying | Typical / year | Self-host instead |
|---|---:|---|
| Bitly Core / Growth | $1,200 | Shlink + your domain |

**About $1,200 / year** on a small team, before you count lock-in.

## Deploy on Railway

Placeholder: Shlink + a database (easiest), or Dub if you need attribution dashboards. Custom domain on Railway.

[Start on Railway](https://c17.io/go/railway/shlink-urls?from=%2Fstacks%2Fshlink-urls.md)

## AGENT_PROMPT

```
Replace Bitly with Shlink (preferred) or self-hosted Dub.

- Shlink: database + a public domain. Create one short link and a QR. Set the 404 redirect.
- Dub if you need click attribution dashboards, not only a short URL.
- Write AGENT_PROMPT.md.
```

## FAQ

### Shlink or Dub?

Shlink if you want a short URL and an API. Dub if the job is campaign attribution. Most Bitly users only needed the short URL.

Source: https://c17.io/stacks/shlink-urls
