212 comments

[ 2.1 ms ] story [ 254 ms ] thread
I literally spent all day Tuesday trying to find a decent alternative to bit.ly. I'm so glad this exists.
If you're spending a day why not just roll your own?
Because it takes longer than a day to build?
Only if you take a 12hr lunch (can happen)
This looks nice!

I recently deployed my own Rallly instance (Doodle alternative) via docker-compose and would love to give dub.sh a try.

Any plans for releasing a docker version?

No plans yet, but you can easily clone this repo and deploy your own version on platforms like Vercel.com, no docker containers required! :)
Here’s mine: https://xn--gda.at
Apparently HN replaces ï.at to xn-
Didn't think they'd handle punycode like that.
Do you have any mechanisms to handle abuse? That's a common problem in the URL shortener space, and usually leads to them getting blocked from most platforms.
Yeah I was thinking about that right before launching last night, gonna go ahead and add some simple abuse prevention measures now!

My first idea is blacklisting certain problematic hostnames and not let folks add them. Can you think of any other abuse vectors?

> Can you think of any other abuse vectors?

Just be prepared that your service will be (ab)used for linking to malware, pirated content, porn.

I really hate link shorteners, because they inevitably die and leave a spray of broken links over the web. What’s wrong with normal URLs?
>What’s wrong with normal URLs?

Length (in many contexts). Agree or disagree, but that answers your question for the "why" from what I have seen in my experience. Marketing wants to link to something sexy like "te.st/dog" vs "news.ycombinator.com/item?id=32939407". Many sites may have longer url structures (esp nested structures) for various reasons that are not easy to remember or sexy to have on an ad, so when it's short it's easy to remember, and simple to type out for the user.

it's not really about it being sexy, it's about it being able to be typed in manually on a mobile keyboard by humans. the url editing experience on mobile browsers is terrible. like trying to write an essay through a keyhole.
Tim Berners-Lee invented hyperlinks so that URLs can be shortened to a single word, character or even image while keeping them visible to the user if need to by hovering over it.

People using these kind of links shorterner are people using bad tools and bad UIs. This is that usage that needs to be corrected, and not by inventing things even more stupid.

You can't put a hyperlink on a magazine, the tv, or the radio. There are definitely reasonable applications of shortened URLs that apply outside of the normal day-to-day web browsing and applications.
qrcodes are superior for most printed usage.

It never occured to me to type an url from a radio or TV message and I've never heard anyone spelling an url from a url shortener. All TV/radio broadcasters will rather tell you check for more information in "name of the show" on "domain of the TV/radio channel" or their social media feed. They all have a web presence anyway.

Just wanted to chime in and say that QR Codes are next on the roadmap! Would be fun to learn how to build those
> qrcodes are superior for most printed usage.

Agreed

>It never occurred to me to type an url from a radio or TV message and I've never heard anyone spelling an url from a url shortener.

It happens. How do I know? Every time I've included a url (shortened or not) in a radio/tv ad, I've gotten verified traffic.

> All TV/radio broadcasters will rather tell you check for more information in "name of the show" on "domain of the TV/radio channel" or their social media feed.

This is a best practice for sure, but we all answer to someone, and that someone might not care.

how are they any better than url shorteners? Now I have to download a qr code reader, screen grab it, convert it with said app, and that opens in a browser
Aren't QR code readers built into Android and iOS?
Depends on your OS, manufacturer, and version. In Android, it depends on your camera app (and version). Later Google Camera versions have that, for example, but earlier ones (as of a few years ago) did not.
I'm on PC at least 75% of my time and not on my phone. My phone is mostly for messaging, music, email, and killing time at the airport/airplane/wherever I'm waiting. I get the point about extremely long URLs though, but most of the time that's not an issue unless you're printing it out
apart from the download that happens once, it is just a case of pointing your camera to the code and the browser open by the touching the screen once. Quicker than typing a shortened url.
They are better because you know the exact url you will reach before sending it to your browser.
> qrcodes are superior for most printed usage

Disagree. I can't scan or type a QR code into my computer.

Usuallt you don't deal with printed code when you are in front of a computer and even then it is easy to scan the code with your phone and paste the link on your computer.
I don't? I do most of my reading at home where I have multiple computers in easy reach. I'm also not sure how I'm "easily" copy/pasting between my phone/computer. Is this an iOS/OS X thing? Not everyone is in that eco-system.
Quite a number of apps allow you to easily copy/paste between Android phone and computer:

- BlitzMail, via email - Joplin, via desktop client - Nextcloud/Owncloud - Termux, e.g. via ssh, rsync, ...

Various messenger apps with desktop clients or web interfaces, e.g. Element (matrix.org) or Threema.

I run NextCloud on my computer and laptop, and just checked... no I can't "just copy/paste" from my phone to my computer, or at least if it can the interface is hidden to the point I can't figure it out. I'd have to scan the QR code, have it pop open my browser, select the url, long press to copy, navigate to the NextCloud app, create a text file, paste the url, save the file, open it on my computer, copy the URL, and paste it into my browser.

Admittedly, sending it via e-mail or something would cut out a couple of those steps (still a far cry from "just copy/paste"), and is what I do on those rare occasions I do need to take a URL from my phone to my laptop, but you know what's even easier? Just sitting down at the damn keyboard and typing in whatever.com/coolthing.

Why do I need two devices just to browse your damn website on a decent sized screen or buy your product?

While I agree that textual links and qr codes aren't the best solutions for certain tasks, the workflow you describe appears a bit too complicated. What I do:

- scan a qrcode with a qrcode app (I use a version from f-droid) - choose "share as text" in the app - select the Owncloud app, which asks me what name the file should have

No browser step needed on the phone. In the desktop's browser I navigate to the Owncloud, open the file just saved and click on the link. No cut/copy/paste involved.

What I really do:

- scan the qr code (or the text with an OCR app like TextFairy) - share the snippet with the Joplin app - open the Joplin desktop version and there's the link or text

Or I actually use Blitzmail (share as text from some other app, which counts as the "cut" step of cut/copy/paste), then select the email arriving on the desktop and select the link (i.e. "copy" ) and "paste" it into the browser, where the last step is usually done by the desktop which offers a "open this link" menu for links in texts.

Using the Blitzmail app serves as an easy record keeping device too, when I just send a whole text block containing a link, so I have the context at hand later, if needed.

I am doing that with kdeconnect/gsconnect on linux. The kdeconnect app on android is at least available on f-droid repo and allows you once on the same wifi network, to share clipboard, do mounts, transfer files, get notifications, use the phone as a remote to control the video plan of netflix/hbo/prime, etc.
That's because desktop OS vendors still haven't integrated that feature. They just don't care.

But it's not rocket science. Why the heck my iOS camera has a built in QRcode reader, but why doesn't Firefox or my webcam app on my PC?

It's niche but I always come across it when setting up a new 2FA account and I need to save the code through the mobile app instead of my PC. Such bullshit.

Can't wait to watch people trying to scan QR codes from their TV with the selfie camera on a laptop or even desktop.

Agreed that QR codes are better for mobile devices and sometimes useful on a laptop.

But also QR codes can only be scanned as long as visible.

corp.ltd/specialoffer is easy to remember and type on any device

Unrelated recommendation - 1Password will scan QR codes and can store TOTP 2fa tokens for you. I assume other password managers also have similar features.
Bitly exists because of Twitter and SMS character limits.
I run into similar problems in a corporate context. Being able to quickly tell someone "the provisioning portal is at corp.short/provision" is easily 10x more useful than "go look in the wiki for the link"
I don't know how long this has been true but all links in tweets are replaced with Twitter's own link-shortener links (t.co). No matter how short your link is, in a tweet it will consume 23 characters.

https://help.twitter.com/en/using-twitter/how-to-tweet-a-lin...

This happened after bit.ly and other shorteners started to have great financial success. Ecosystem annexation at it's best...
I agree, we sell PDFs with the ability to be printed, all links are short links (on our own domain, though) so they aren’t lost/inaccessible when printed.
I think you underestimate how much separation there sometimes is on large teams with the people who run/build the website, vs the marketers who are moving fast. I've seen terrible devs who will claim it takes DAYS to add a simple redirect of dog.com/X to your long marketing url (cutting out services like this), but the marketing team can't wait that long so services like this are much more async in many contexts, too.
100% this... I was our web dev working with marketing, and before I got there, short URLs/marketing links had to be manually created as new pages in Drupal sometimes, in a 301 redirect dashboard other times (what the hell), which meant submitting a ticket, waiting for it to get prioritized, etc., then making sure there were no conflicts anywhere.

Switched it out with a cheap commercial short URL system with its own domain, and the marketers could login anytime and make their own URLs, see all the analytics, edit the destinations, etc.

Everyone was much happier after that. It did indeed cut the wait from days to seconds, and plus they had real-time usage data after that.

Terrible, perhaps, but very smart.
(comment deleted)
Actually, link shorteners are just a symptom of the problem.

The problem is the DNS system itself. It is the reason that your email address gets spammed, and the reason that you can DDOS websites, etc.

DNS is a glorified search engine, and it is only really used for root urls like mydomain.tld . It's pretty much only good in two contexts:

1) for when people dictate a specific domain name verbally to someone, and even then, spelling errors can occur.

2) advertising a URL somewhere to a landing site. But you can just use a QR code that people can scan, or a link in a webpage.

Everything else may as well be at non-human-readable domain names, in which case you can even use distributed hash tables instead of DNS. Perhaps one day browsers will allow plugins realize their own schemas, such as ipfs://hjkldfjhsdfkjgsdhfgsdf and the plugin would do the routing instead of DNS. Is that currently possible with standard browser extensions?

I'm pretty sure my email gets spammed because bad actors exist in the world. I'm sceptical any technical solution will protect against that.
It takes both. If people couldn't send a message to your email just by knowing it, then you wouldn't get SPAM.

Instead, you could be giving out capabilities, to send you email. And if one of them was abused, you'd simply turn it off, and only accounts who used it in the past could continue to send. New ones wouldn't be.

Right, but your domain name is part of your marketing effort. And you don’t need to resort to a short URL service to get a branded URL. If you listen to any sponsored podcasts they have the job of reading out a sponsorship URL, and inevitably it’s something like {sponsoringCompany}.com/{podcastName}, which is totally understandable to people.
It is maybe understandable but also too long for lots of content.

You want it to be as short and memorable as possible for anything which has limited "screen" time. Which is basically everything, i.e. Radio broadcasts, video streams/adverts, Billboards you drive by, advertisements on websites etc.

I feel like custom URLs are better than random bit.ly. I can create a link like `company.com/summer23promo` that is easier to remember than `bit.ly/gsjsun618n`

I think the paid version let's you do custom URLs but that is just a worse version of doing it yourself since a typo can lead to a completely random website.

Not to mention the fact that they can be abused to redirect into malicious sites, but I think that is pretty obvious at this point.
Agreed I think on bitly at least you can use some character after the URL - I think its bit.ly/somethingsomething+ (the plus) - and you get a bitly page that shows you where the URL is supposed to land.

I think tinyurl had a similar mechanism.

TinyURL has a feature called preview mode, which allows you to automatically preview any URL before getting redirected without using the extra +. I think it's a nice feature.
IIRC, tinyurl also rewrites URLs to some commerce sites to include their affiliate token.
It used to show you all the click stats too, it was useful to see how everyone's ad campaigns were doing
In past they took much space in comments and messages. Now most sites have gotten smarter and automatically shorten a long URL when presenting it. For the first part, depending on site, a deterministic shortener could be possible. For example "example.com/blog/2022/09/22/first-article-of-the-day.html" can be "example.com/s/b22092201". Remember read someone utilizing something like this but cannot find the article.
> What’s wrong with normal URLs?

Nothing, but how would you then track users and redirect through 3 nested services to attribute purchases? ;)

how else would you embed tracking params into spam links sent over sms, riddle me that
Query strings after an image URL are the most common I have seen.

    https://some.tld/obvious-tracking/some-transparent.png?someUniqueCode
But now you've burned about 40% of your character limit.
Fair enough. I hope that should I ever get a smart phone that there are filters to make all SMS text only. My current flip-phone just renders html as text and binary images as garbled junk.
> I'm OK with this.

I mean, on a personal level sure, but if you need to get out an SMS with a link and a coherent message, you want all the characters you can get.

In that case I would go with a tiny SMS specific domain for the company and a tiny query string. https://my.tld/r?B33F Two hex values should allow for a large number of redirects for a single company. Or even one hex code and use a different letter /a?00 /a?FF /b?AF etc... 36x255

I would give the marketing/sales team a way to update the letter/HEX map as a plain text file.

Cool, but now we have implemented a link shortener, in response to a post saying "What’s wrong with normal URLs?"
I was suggesting a way to make short url's without using someone elses URL shortener. If one controls the mapping it will persist as long as that company hosting it exists. It wont vanish and the webmaster/developers can update URL's as they see fit.
Agreed. Please do not use this software, nor link shorteners generally.
Short URLs are nice for some things. QR codes for example work better the shorter a URL is.

Nothing's wrong with normal URLs. Every post on my website can be reached by a single decimal number appended to the end of the domain.

But this requires every website on the internet to care about having URLs of reasonable length. URL shorteners allow a third party to put a bandaid over the problem.

There's a project[0] designed to archive various URL shorteners to combat the link-rot problem. It's ran by ArchiveTeam which is a bunch of preservationists who are hell-bent on preserving parts of the web that otherwise would go into the dustbin of history.

[0] https://wiki.archiveteam.org/index.php?title=URLTeam

[0] https://tracker.archiveteam.org:1338/status

yeah, this is cool, but in the future, wouldn't it be better to just skip the link shorteners?
Maybe these fine people should run a url shortener service.
An use case:

I work daily with short links, because we need to pass parameters in URL and, depending on the amount of parameters you use in your URL, it gets bigger quickly.

Then you have many stakeholders, with no IT background, using those links and if for some reason they use ctrl+c missing some part of that big URL, the access will be broken and then they will complain its not working.

Short links are better to avoid that problem.

That's why you have your own link shorteners. There is no reason to use some third party shortener that may or may not be alive the next year.
I actually use a third party, because I'm not a dev and have no idea on how to do one myself.
It's actually very easy to implement if all you want is just shortening and you have the slightest idea about databases. All you need to do is generate a random string (functions that do this for almost any language are available online), save that string and the long URL to the database.

If you want tracking and statistics though, it gets more complicated. The simple version can be a good way to get into web development now that I think about it. You learn about forms, GET/POST, databases, very basic SQL etc.

thanks a lot for elaborating it :)

how it works with the domain tho? i need to buy a short domain that will concatenate with my database strings, is that correct?

If all you need to do is to "hide" the parameters, you can just use a subdomain of your choice regardless of the length, like post.domain.com or a.domain.com. However, if you want an actual "shortened" url, you will need a short domain name. Shorteners use TLDs other than .com to make it even shorter. For example, reddit.com uses redd.it for short urls.
> What’s wrong with normal URLs?

I've seen some random blogging software break when you embed certain kinds of links into articles, for example, ones that have query strings (?key=value), where the question mark gets interpreted as something else by the software and thus the link gets cut off and no longer works.

In cases like that, it makes sense (because you literally don't have a choice, unless you want to migrate to something else).

Also some might enjoy the consistency of short links, instead of having a URL that's really long. That is also pretty nice for putting the URL on a poster, flier, or sending it to someone.

Some also just don't care about the implications of the link going down in the future.

When a URL is generated and contains some long cryptic un-memorizable code they're pretty handy (but only if you can specify the path name yourself, which is how I use tinyurl)
Hey! Creator of Dub here! Appreciate the sentiment, also great point in the replies about link shorteners leading to spam.

My plan with Dub is to keep this running at a sustainable pace for as long as possible, and I believe it's possible for a few reasons:

- Operating costs for Dub are quite low at the moment, thanks to Edge Functions (https://vercel.com/edge) + Redis.

- I'm leaning into the custom domains & self-hosted aspect with the freemium model – where enterprises and businesses would be able to get set up with a custom domain link shortener super easily.

- Agree that individual short links are definitely not sustainable in the long run, I might set a rule where randomly-generated links > 30 days get deleted, to save it you'll either need to make an account (to prevent spam) or set up your own domain.

I have wanted to implement a link shortener with a couple of monetization ideas to avoid that:

* Allow you to "buy" transparent clicks for your URL (e.g. 1 cent per "transparent" click)

* Implement "ad gateway" like what adf.ly does for non-transparent URLs

* Give you X small amount of "transparent" clicks for free

* Use something like IPFS or (gasp) Ethereum blockchain for storing the data... allow you to keep your URLs alive by paying for them (this last one is not that clear)

* [Don't kill me] At some point (back when it had started) I though of putting a WASM miner in a frame when visiting a page.

My main problem is that I have not been able to get a good domain name.

I see you also read the Bitly playbook re: WASM miner
With that in mind, QR Codes are the new shortlinks.

Sort of :-)

Hmm... I wonder if Google interprets and follows QR Codes?

I remember the short url craze - bitly alternatives were everywhere (even @ the G[1]!) and creating one was basically the Hello World of programming for a time.

Real shame how it went from convenience tool (and largely coupled with microblogging character limit) to aggressive corporate tracking (though bitly was always a champion of the latter)

https://developers.googleblog.com/2018/03/transitioning-goog...

FYI you have some rogue script or something on the page that brings my pretty hefty windows 10 pc to a halt. It spikes my CPU to 100% and the page is in like 1FPS. I think it's your countdown thing for pricing. Something is def up with it, you may want to disable that temp.
Same thing here. After scrolling about halfway through the page, fans went off and the whole site came to a crawl. Could also be the globe animation.
Ahh yes I believe it's the globe animation, it uses a very simple stripped down version of webgl & threejs (based on the lib: https://cobe.vercel.app/)

Gonna think about how I can optimize that further! Thanks for the headsup y'all!

you could render a mp4 or webm video, it wouldn't be as fancy but would just work
Slows down my pretty basic laptop as well.
You know, if you put your paging file into your Google Drive, Dropbox, etc., you're effectively downloading more RAM.
I wanted to add to this, but the edit window has ended so...

To go even further, if you have gigabit internet and the data center that hosts your drive is in the same city as you, then putting your swap in cloud storage could potentially be faster than storing it on a hard drive!

Obviously, this is making a lot of assumptions, like your ISP doesn't do any silly routing (I'm in Portland, and for a while a couple years ago, my ISP routed all my traffic through Seattle), assumes the cloud storage provider is using solid state storage, and all the code involved in retrieving it doesn't add more than a couple ms of latency.

I wonder what we'd need to store data 'in transit'.

There's a delay with data reaching a location, so why can't we send data to ourselves around the globe and when it gets to us, send it around again.. just around and around.

It spikes my GPU to 100% as soon as I open the page.
(comment deleted)
Same here too.... 8% CPU and 95-100% GPU usage (Firefox, latest version/patch)
Chiming in - brought down my Chrome tab on a Ryzen 3600x. All for a page to display pricing.

I don't get it.

I was doing "native compile" of several hundred el scripts for emacs and my computer was fine, clicked on that page and everything started taking a couple seconds to click afterwards lol. Definitely something up with the javascript on there.
Yep. Brought my 16GB Macbook Pro to a halt.
Sorry, if you want to see the spinning globe, you'll need an M1.
I think it literally killed my M1 MBP during a meeting this morning (had a few tabs and a zoom meeting running). My screen went black and everything locked. I had to hold down the power button to reboot.
No joke! Typing this from my phone as it somehow froze the browser on my workstation.
I genuinely thought it was my graphic driver glitch that for a second all my screens went dark. Not until I read your comment here did I realise they were connected.
Is there a special thing to prevent being blocked from most platforms? For instance, if I post your shortlink on HackerNews, can I be marked as "dupe"
A bit of a shameless plug, but I also created an open-source link shortener, using Python and Flask. Although not as polished and full-fledged as this one, it done its job pretty well, with basic click statistics and custom key URLs.

https://github.com/HoangTuan110/flyurl

The grandfather of all link shorteners: https://shorturl.com/

I had a .vze.com subdomain registered there in approx. 2006 and it still is live. Unfortunately, the target domain and website is long gone.

The site looks quite laggy on my phone, and moving around feels janky. Could it be the Javascript that caused this?
Hey! I believe it's the globe animation, it uses a very simple stripped down version of webgl & threejs (based on the lib: https://cobe.vercel.app/)

Gonna think about how I can optimize that further! Thanks for the headsup!

FYI, I'm on an absolute beast of a machine and my browser locked up while trying to view that page. When I mean beast, I mean beast.
Oh nooo :( what's the specs of your computer? I'm gonna try and optimize this further tonight!
I think you should get rid of that stuff. I was compiling some el scripts in the background and surfing around just fine and got to your page and it starting taking a couple of seconds to respond to mouse clicks until closing the page, same for both Brave and Firefox (most recent versions on both) on windows 10. I'd give benefit of a doubt since you're doing a new service but most people wouldn't come back if that happened to their machine.
Some necessary questions:

- Does this use any blacklist to prevent URL shortener looping (i.e. using multiple URL shorteners on top of each other to bypass the checking), or preventing any potentially malicious sites? - Does this have rate limits? URL shorteners get abused quite regularly, so this should be necessary.

Very good questions! I was actually thinking about that right before launching last night!

I'm planning to blacklist certain problematic hostnames and not let folks add them.

In terms of rate limits, it does have rate limits when it comes to collecting analytics (if you spam click a link >10 times in 10s it still redirects you but it stops recording clicks.

I can't think of how URL looping could bypass checking – could you elaborate?

Assuming validation of their licensing one might be able to use the same .txt lists that the browser addon uBlock imports as a baseline, then have a way to add custom entries. To keep Google and Bing happy maybe check to see if they have an official list of bad domains as well.
Good luck on your link shortener project! I made an open source link shortener many years ago and eventually threw in the towel and quit. The problem domain for link shorteners is one of anti-spam and abuse. Charging for it makes complete sense to try and weed this out but having any amount of "free" I found to be a hotbed of reports thrown against my hosting provider and registrar for supporting spam. I found myself getting quickly blacklisted everywhere since spammers love to use new shorteners for bypassing their own blacklists.

I've not looked into the problem again in 10+ years since. If I did I would 100% skip the free plan.

Great website. I really like the globe and overall theme - reminds me of Vercel. One small note - the github stars image made me think you had 0 stars. Not a big deal, but you might want to update it.

Great work

The UI of the product is nice too - really feels like Vercel which is a good thing. It would be good if you were able to build UTM tags in the product, and pull analytics on them - apologies if this already possible.
That's exactly the next thing on my roadmap! Thanks for the suggestion!
Oh my word! Good catch lol I'm not sure how that broke, will fix now!

And thanks a lot for the kind words!

I tried using a bitly alternative but found that when I sent them to users via email the links were flagged by gmail as being dangerous. There were no problems when I sent bitly links, or the plain links.

I'm hesitant to try another alternative because I wouldn't want to get set up in a new system, only to have these problems crop up again.

I assume thats because bitly has excellent blocking for known malware sites and techniques (rate limiting/etc) since they've been around for so long.
Genuine question. Why would people pay for the pro version if they could just host it for themselves? Does the pro version have some proprietary stuff which would have advantages to the selfhosted version?
I can easily envision a non-technical person spending a few bucks for this because they don't know how to set things up without help. I don't see that working at $99/month though. It's WAY more than most bit.ly plans for a vastly more limited product.
That's a great point, thanks for mentioning that! I'm gonna do some pricing research over the next couple of months to see what the optimal pricing is for a tool like this! :)
The usual use case for paying for something you could self-host, is that you don't have to self-host and therefore manage it. Someone else deals with installation, updates, and ongoing availability.

For something like this there is perhaps extra factors like someone else worrying about abuse by malicious users and the resulting risk of being black-listed by spam filters.

At my work, getting approval to pay for this would take about 5 minutes. On the other hand, if I had to provision a server to self-host, I might be lucky to have this done in the next six weeks, depending on how IT is feeling when I ask.
Here we'd also have to go though a vendor review (security, legal, etc.)
How does this compare to YOURLS [0]? btw, I like link shorteners for their millenial quirkiness. kickme.to/the2000s

[0] https://yourls.org/

Heh, I did the opposite recently after reading "Software Engineering at Google" and I discovered that even though it would be very easy to make: there is no equivalent to the `go/` permanent "friendly" URL shortener.

It can be backed by a TOML file for hardcoding URLS or a database for making it easy to add new ones (which I think is the Google way).

If I did a stupid; or a better version already exists: let me know.

https://git.drk.sc/dijit/redirector-rs

https://github.com/dijit/redirector-rs

True! But a link shortener SaaS is more than just redirects – it also needs data visualization to help marketing teams understand the performance of their links, which is half of the value prop imho!

That being said, absolutely love your spin on the go/ links – I learned about it from my friend who works at GitHub and it's kinda blown my mind ever since :)

I'm not sure how being open source helps here. How do we know the code that is running on the service is the same as the open source code?
I mean, you could say that about any open source service. The best way to see if it works like the service, is to just compile it and run it yourself...
It's basically an effort to promote code transparency + user privacy, and in general it's just super fun building in public! :)
The last thing the Internet needs is more link shorteners.
I'm the creator of https://T.LY URL Shortener and am always interested when I see new short link services. My biggest piece of advice is to figure out a way to detect malicious URLs before your service is completely shut down. A month after starting T.LY, my servers were disabled by my hosting company without warning. Since then, I've worked on systems and tools to prevent malicious short links and make the service more reliable.

Most comments I see here are questioning why we still need URL shorteners. Print, media, SMS, and analytics are just a few reasons. I wrote some additional info on my blog: https://timleland.com/are-url-shorteners-useful-today/

Another interesting thought is when you create a TinyURL, it's 20 characters long, and Bitly links are 14 characters long. These services cannot create short links anymore. As a URL shortener grows, the number of actual short links diminishes. Currently, T.LY has over 10 million short links, which means plenty of four and five-character short URLs are available.

Two character URLs 3,844 (62^2) unique combinations

Three character URLs 238,328 (62^3) unique combinations

Four character URLs 14,776,336 (62^4) unique combinations

Five character URLs 916,132,832 (62^5) unique combinations

Six character URLs 56,800,235,584 (62^6) unique combinations

Seven character URLs 3,521,614,606,208 (62^7) unique combinations

Eight character URLs 218,340,105,584,896 (62^8) unique combinations

Just curious, can a short link be a single emoji as the URL (after domain)? If so, does it technically take up 4 characters?

And (if you don't mind answering) how much does such a short domain like t.ly cost?

It is possible, but your users will need to type emojis (which can be hard or impossible on some devices), or you'll need to urlencode it in href attributes and it will actually take encodeURIComponent("").length = 12 characters (imagine a simple emoji between the quotes). It will also require bigger QRCodes than alphanumeric characters. It might display incorrectly in address bars.
Yeah, someone actually created an issue for this on the repo: https://github.com/steven-tey/dub/issues/8

I'm planning to not allow emojis simply because of the accessibility challenges that it presents to users :')

Emoji domains though, on the other hand, are really cool and more than welcome to be added :)

Hey Tim! Thanks a lot for sharing your experience with T.LY! I'm definitely going to implement some abuse prevention measures over the next few days. My first instinct is to prevent folks from pointing shortlinks to certain malicious sites – do you think that'll be enough? Or are there other abuse vectors?

Also, very interesting note regarding the hash combinations! The main focus of Dub is probably going to be for folks to add their own domains – but this is something that I'll keep in mind as well!

You should add a way to export all the URLs on the platform in a format that matches the URLTeam (https://wiki.archiveteam.org/index.php/URLTeam) releases.

That way, when you shut down your service, we can figure out what some of these short links went to.

> when you shut down

That's a reasonable assumption, since the service is not likely to be sustainable financially.

Why shouldn't it be sustainable? Seems like the sort of service where a freemium AGPL open source model might work quite well.
Agreed – the plan is to keep this running as long as possible, and the freemium AGPL model is a great way to get there in a sustainable pace! :)
Sorry for the pessimistic quip.

I love that it's open source, the site design is beautiful, and the service looks well made. Good luck!

Hosting costs money regardless of whether the underlying codebase is open source, but why would anyone pay for a URL shortener? Maybe those things had a use a decade ago but I don't see a use for them nowadays and definitely not enough to pay for one.
"but why would anyone pay for a URL shortener?"

If you are sending automated sms, to around phone carrier blocking people use bit.ly etc. A new domain would take a lot of testing.

As part of url derive process, you could kick off a process to archive the redirect with the Internet Archive. When you turn the service down, no further action is required. It can die at anytime and no one is worse off.
Note that for many use cases, you can host your own URL shortener for free on GitHub pages (or Netlify, etc) by creating static index.html pages containing HTML redirects[0]. If you buy your own short domain, you can even port it between different providers if necessary.

[0]: https://apitman.com/18/#html-redirects

I read "Billy alternative" and waited for some cool Ikea hack. Bummer.
lol that would've been amazing haha