I’ve been in a domain buying mood lately and decided to purchase 404ts.com to complement my primary but longer domain 404techsupport.com. While thinking about having a short URL for the sake of convenience, what else am I supposed to do with it than setup a URL shortening service? Similar to Bit.ly, TinyURL, Is.Gd, and the dozens of other sites out there that provide URL shortening, hosting my own service gives me a few features none of them can: control and branding. If I became dependent on one of the sites out there and they decided to close up shop because they found there’s no revenue in the URL shortening business, all my links would go with them. By hosting my own service, I have full control of the database and the service operating on my server. Also by hosting and using my own domain, I get to brand my links as 404 Tech Support-affiliated instead of a random long link. So here’s an overview of two of the services that I checked out, Shorty and YOURLS, with other options at the end of the article. If you have your own hosting, these services are so easy to setup, it’s worth looking into.
Shorty
Shorty was one of the first URL shortening services I found as I looked for a self-hosting option. Without much research, I gave it a try. This wasn’t too much of a mistake but it wasn’t the best option out there, though it is still in beta.
To run Shorty, you just need PHP, Apache with rewrite on, and a MySQL database. To interact with it, you’ll need to use a non-IE browser and if you want to use the service off of the top-level of your domain (example.com instead of example.com/short), you’ll have to modify the install instructions a little bit to include this part. Setting up Shorty is as easy as downloading some files, uploading them to your server, creating a database, and putting that information in a configuration file. You then create a user name as part of the installation process so you can login to create shortened URLs and view how many visits a link has had.
Shorty allows you to have Auto, Keywords, or Randomly generated short links. Keywords is similar to the custom URLs of other services but it’s also a little different. By and large, I prefer the Custom style.
If you go with a Random URL, it oddly seems to start out with 5 digit numbers as URLs and goes random from there. I’m not quite sure why since eventually you’ll start ending up with holes and random guesses will be more and more likely to collide.
A nice feature of Shorty is that it allows you to immediately see how many redirects a particular short URL has provided. Compared to analytic offering of other services, this is sorely lacking but it has the beginning.
Overall Shorty was acceptable but lacked any ‘wow’ factor. It was noticeably slow to redirect a URL, like you could see it churning when you went to a page. The administration pages were also far from snappy. They were powered by slow, cumbersome Javascript and with enough URLs it gets to the point that it was painfully slow to view the URLs. While it’s in beta, I’m not sure Shorty even has a good foundation. The Javascript dependency and other limits just seem like it’s going to plateau and remain a mediocre product. For one thing, it doesn’t currently work in Internet Explorer 8.
YOURLS
After getting Shorty installed, I was a little disappointed in myself for my lack of research in comparing other services out there. After doing some quick but rewarding looking around for alternatives, I went with YOURLS, Your Own URL Shortener. The install was very quick, just uploading some files, adding some configuration information about the database, and then running an install file. YOURLS also worked perfectly from the root of the domain without needing any modification. Its redirects are almost instantaneous instead of the 2-3 second delay for each one I experienced with Shorty. Interacting with the admin side of the website was also faster since it wasn’t bogged down with Javascript.
YOURLS requires:
- A server with mod_rewrite enabled
- At least PHP 4.3
- At least MYSQL 4.1
The act of going to the admin interface and shortening the URL is easy enough but it’s made even easier by the bookmarklet tools that YOURLS provides. You can use a simple bookmarklet to open a new tab and generate a random shortened URL or you can use the custom bookmarklet to create a custom URL as well.
Once you have the URL created, you can easily share it to Twitter, Facebook, or FriendFeed with a single click.
YOURLS also gives you some more in-depth analytics than just the click count. It can tell you when the clicks came in, from where (geographically), and from what (referring sources).
I previously used WordTwit as a WordPress plugin to allow me to automatically post to Twitter whenever I made a new post, now I’m using the official YOURLS WordPress plugin to use my URL shortener. It has worked great and it’s nice to have those links under my control and pushing the 404 Tech Support branding.
Other Options
Of course, if you’re like me, you’ll want to do your research. From my experience, I can gladly recommend YOURLS but you might also check out these others: