All the recent talk about the future of tr.im and giving up control over our links on Twitter to third parties made us look into alternative solutions for shortening our links over the last few weeks. While there aren’t too many alternatives to using hosted services for short links, we did come across two self-hosted solutions that you can install on your own hosting account: z.ips.me and Shorty. Both have some pros and cons, but they do give you total control over your short links.
Some people are still a bit confused about what it means to host a service themselves, but in order to use the tools described in this post, you need a domain name (preferably a short one) and a web host that gives you access to a MySQL database, as well as the ability to run PHP scripts. This includes virtually any host today, but just to be sure, check with your host before you install these services. Z.ips.me also needs support for PHP5 to work properly.
Installing these apps is as easy as it gets when it comes to self-hosted services. All you need is basic information about your database (database location, database name, user name, and password). You then download the apps and enter the database information into a text file (make sure you read the readme file for z.ips.me and the _instructions file for Shorty for specific instructions). After this, you upload all the files to your host, point your browser to the install/ file (or _install/ for Shorty) and your are ready to go.
These services are protected by logins and passwords, by the way, so you won’t have to fear that somebody else will be able to access your site and service.
If you have never installed a web service on your own host before, have a look at this post, where we describe some of the procedures and tools in more detail.
Comparing Shorty and Z.ips.me
Shorty is the prettier of the two applications, but it also has fewer features. While the Z.ips.me interface is quite sparse, you do get more options (including a choice between temporary and permanent redirects) and more detailed statistics about how your link was used (referrers, browsers, operating systems).
On the other hand, Shorty can give you random URLs (similar to what most third-party apps do by default), while z.ips.me forces you to decide on your own URLs. Shorty also allows you to combine keywords, though that probably won’t help you if you want to create really short URLs.
Of course, if you do decide to run your own URL shortener, you will miss out on most of the ecosystem that has grown up around Twitter and services like Bit.ly. Your favorite Twitter client, for example, won’t offer built-in support for your own URL shortener.
You’re In Control
In return, however, you do get full control over your short links. If you already have a reasonably short domain name or you are able to register one that works for you, installing these services is easy enough and you won’t have to worry about a third-party service going out of business and taking your links down with it.