- cross-posted to:
- selfhost@lemmy.ml
- cross-posted to:
- selfhost@lemmy.ml
A self-hosted URL shortener: Shlink - Keep control over all your shortened URLs, by serving them under your own domains, using this simple yet powerful tool. https://shlink.io/
I was very surprised to find this mature, full-featured URL shortener. It’s written in PHP and includes Geoblocking so your shortener isn’t abused.
A Docker quick-start guide: https://lnk.clifmo.com/ljk13
Can I ask - why would anyone do this? Several URL shortening services of the past have shuttered and it has left the web littered with links to sites that can never be resolved (linkrot) - this to me just seems like a another surefire way to speedrun future deadlinks in forums etc. Why?
Edit - I have misunderstood the assignment.
This is targeted at self-hosted/personal-domain stuff only, not general internet site URL shortening/redirection.
I find link shorteners useful for sharing (ephemeral) links to others (especially if they’re massive) but for linking stuff on the web where you can hide it under an anchor tag is definitely a bad idea.
How so? I am hosting and maintaining it for my own work and links. I have every incentive to keep it up. And if it goes down, only my links to my own content go down. And, the reason I did this was Bluesky has a character limit.
Ah that is probably my bad then, I read it as being able to redirect arbitrary URLs, hence the need for geoblock and abuse protections - if it’s only your own self-hosted/personal domains then yeah that absolutely makes sense.
I think the concern re:geoblock is that the REST API is just out there, unauthenticated. I need to shut those off or limit them to the internal network with Traefik, but I still need the short links to resolve. I’m not sure if that API is used for that, or what. I haven’t explored the code yet.