Why I built my own short URL site (and maybe you should, too)

by Gregory Korte on July 29, 2009

There’s nothing wrong with TinyURL.com, the url-shortening service that started in 2002 to help tame unwieldy links and has become indispensable in the age of Twitter.

It’s just that, well, (1) everybody uses it — or a clone like bit.ly or snurl.com or snipurl.com — so it’s a bit impersonal, (2) there’s no guarantee it will work, and (3) as it’s grown, the typical “tinyurl” is now at least 25 characters long if you include the protocol and six-character path name.

So I’ve registered the domain name 4gk.us and set up my own Django-powered URL-shortening service. I now have complete control over my shortened urls. By shortening the domain name and starting with just one character in the path name, I can get that my URLs down to as few as 15 characters — giving me 10 precious characters per tweet to be even more insightful, informative and witty. Added benefit: I can see which links people are actually clicking on in my tweets (assuming they’re clicking on any — this could get demoralizing).

And okay, yes, I suppose there’s also the vanity thing.

Frankly, I’m surprised more news organizations — and others who rely on social media — haven’t created their own, branded custom URL shorteners. If you’ve got the server space, the cost is just $10 to register a short vanity domain (which are getting gobbled up fast, by the way, especially in the .com and .us top-level domains.) And if a third-party service goes down, you’re losing traffic. If your own servers go down — well, you weren’t going to get the traffic anyway.

I’m not opening 4gk.us up to the public, because I don’t have any way to screen out link spam or prevent abuse. But I’d be happy to set up free accounts for trusted friends, family or colleagues who might find it useful. Seriously. Let me know.

(Also, for those interested: I cribbed the Django code from Nilesh D. Kapadia, who is a pretty bright fellow, and modified it only a little. His URL-shortening Django app is open-source and available for download, if you’re into such things. I also recommend Webfaction as a Django-friendly web hosting service.)

Previous post:

Next post: