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.
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.
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.
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.
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.
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!
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.
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.
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.
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.
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 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.
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.
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.
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.
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.
>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.
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.
Unrelated recommendation - 1Password will scan QR codes and can store TOTP 2fa tokens for you. I assume other password managers also have similar features.
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.
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.
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.
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
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
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.
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.
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.
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 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.
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?
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.
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.
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.
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.
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.
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.
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.
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.
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'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.
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.
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.
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)
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
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!
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.
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.
firefox and brave both choked on it for me (while a bunch of el scripts are building in the background). that page killed my GUI responsiveness lol which was unencumbered before I went there (aka windows was doing fine with compiling in the background and letting me browse the web)
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?
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.
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! :)
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.
Funny thing – I actually had to do some regex validation for domain submissions from users and this was one of the edge cases I had to account for haha
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.
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 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 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.
- 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.
I did something similar with https://statico.link when I couldn't find a cheap, free and easy service to do this.
It started as a simple nginx URL map since I was already running nginx (https://gist.github.com/statico/14fa84d7e79722031d5e49694191...) but is now a tiny containerized app because friends requested an index page. The requirement is that all links need to be named (i.e. no random hashes).
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)
I ran a variation of something like this myself for years. Eventually, the site was routinely being used for spam-style (e.g., a link to some illegal data, or some advertisement to embed somewhere, etc.) links. And when I took the site down, my users asked me for help to transition away from this service that they were uniquely relying on. It was a mess. See goo.gl. I wonder how you prevent your service from being used inappropriately and how you handle the eventual costs
My plan here is to lean into the custom domains & self-hosted aspect – where enterprises and businesses would be able to get set up with a custom domain link shortener super easily.
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.
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.
I built a very, very basic one of these a month ago to shorten a couple of unruly domains I had. Supports static and dynamic endpoints that you define.
No dashboard, or web interface even - the idea is that you just use CF's worker analytics for usage stats. There's no storage / db sitting behind it, just a single file to deploy as a worker.
Logical next step would be to hook it into KV and include a basic auth/admin API for editing routes and retrieving stats. But even that would add a bucket load of complexity to what is essentially 20-30 lines of obtuse logic currently.
Definitely no plans to deploy as a service with custom domains and enterprise offerings :)
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.
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.
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.
earlier there was an option to add "+" at the end of any bit.ly link and you can see the stats of any shortened URL. Is that something you've given a thought?
The link still works, and the link still gets tracked in redis, you just won't be able to see the stats for the link until you upgrade. It's a similar model to Plausible.io, which I think is really fair! Let me know what you think! :)
It was because of the globe animation, which is a stripped down version of Three.js + webGL. I just merged a PR that should mitigate this: https://github.com/steven-tey/dub/pull/13
Can you check again and let me know if the performance issue is still bad?
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...
That way, when you shut down your service, we can figure out what some of these short links went to.