gitwtfhub

wtf is redir?

changkun/redir — explained in plain English

Analysis updated 2026-08-03 · repo last pushed 2023-12-31

93GoAudience · developerComplexity · 3/5DormantSetup · moderate

TL;DR

Redir is a self-hosted URL shortener that lets you create short, custom links on your own domain with built-in analytics, privacy controls, and an admin dashboard.

Mindmap

mindmap
  root((repo))
    What it does
      URL shortening
      Visitor analytics
      Admin dashboard
      Public link index
    Tech stack
      Go
      MongoDB
      Docker
      YAML config
    Use cases
      Marketing links
      Personal branding
      Go Vanity Imports
    Features
      Custom short links
      Scheduled redirects
      Privacy controls
    Audience
      Small companies
      Developers
      Open-source publishers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Create custom short links for marketing campaigns with built-in click analytics.

REASON 2

Host Go package documentation links using the Go Vanity Import feature.

REASON 3

Manage private and scheduled short links through a self-hosted admin dashboard.

What's in the stack?

GoMongoDBDockerYAML

How it stacks up

changkun/redirbjarneo/klimitchellh/go-fs
Stars939292
LanguageGoGoGo
Last pushed2023-12-312018-05-08
MaintenanceDormantDormant
Setup difficultymoderatemoderateeasy
Complexity3/53/52/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires a running MongoDB database instance to store links and analytics data.

No license information is provided in the repository, meaning default copyright restrictions apply and you should ask the author for permission before using it.

Wtf does this do

Redir is a self-hosted URL shortener, think Bitly, but running on your own server and your own domain. You give it a long web address, it gives you a short one, and anyone who clicks the short link gets redirected to the original destination. Because you host it yourself, you keep full control over your data and your branding. Beyond basic shortening, it offers a few things you'd expect from a commercial product. You can create semantic short links like yourdomain.com/s/promo-deal instead of random gibberish. There's an admin dashboard for managing links, a public index page that lists all your non-private shortcuts, and built-in visitor analytics showing page views, unique visitors, referrers, devices, and locations. You can also set links to go live only after a certain time, keep some links private so they don't appear in the public list, and show visitors a warning before redirecting them to external sites. This would suit a small company, a developer with a personal brand, or anyone running a project that needs short links without relying on a third-party service. For example, a startup could use it to share clean links in marketing emails while keeping click analytics in-house. A developer could also use the Go Vanity Import feature, which lets you host short links that point to Go package documentation, a niche but handy capability if you publish open-source Go libraries. The project is written in Go and compiles into a single binary, which makes deployment straightforward. It requires a MongoDB database to store links and analytics. You can run it directly or deploy with Docker, and configuration is handled through a YAML file. It also ships with GDPR-friendly pages like imprint, privacy, and contact templates, which is a thoughtful touch for anyone operating a public-facing service in Europe. The front-end dashboard is built separately and embedded into the final binary, so the whole thing ships as one self-contained executable.

Yoink these prompts

Prompt 1
Help me set up Redir using Docker and connect it to a MongoDB database. What should my docker-compose.yml and YAML config file look like?
Prompt 2
I want to create a semantic short link like mydomain.com/s/launch-day using Redir. How do I configure this in the admin dashboard?
Prompt 3
How do I configure Redir's Go Vanity Import feature to point a short link at my Go package documentation?
Prompt 4
Walk me through setting up the GDPR-friendly imprint, privacy, and contact pages in Redir for my custom domain.

Frequently asked questions

wtf is redir?

Redir is a self-hosted URL shortener that lets you create short, custom links on your own domain with built-in analytics, privacy controls, and an admin dashboard.

What language is redir written in?

Mainly Go. The stack also includes Go, MongoDB, Docker.

Is redir actively maintained?

Dormant — no commits in 2+ years (last push 2023-12-31).

What license does redir use?

No license information is provided in the repository, meaning default copyright restrictions apply and you should ask the author for permission before using it.

How hard is redir to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is redir for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.