ReadWriteWeb

You Don't Need Bit.ly, Tr.im & Co.: Just Host Your Own URL Shortener

Written by Frederic Lardinois / August 19, 2009 10:59 AM / 20 Comments

shorty_zips_logo.jpgAll 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.

Installation

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.

zipsme_url_stats.pngInstalling 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.php file (or _install.php 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.

Negatives

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.


Comments

Subscribe to comments for this post OR Subscribe to comments for all ReadWriteWeb posts

  1. You do need bit.ly or at least a collection of 'trusted' providers.

    Something that isn't talked about enough are the security implications of URL shortening services.

    Over the last decade we (the security community) has been pummeling into the heads of the novice computer user that they they should not just blindly click links. They should verify either via link hover or some other manual task, check to ensure they know and trust the location they're going to to help prevent phishing. URL shortening services completely destroy this concept and they idea that anyone could easily host one on their own domain is even scarier.

    How long before URL shortening proxies distribute malware before they send the ignorant consumer (or in this techsavvy early adopter) to the true destination.

    This has phishing and malware distribution all over it. MARK MY WORDS.

    Posted by: Jason | August 19, 2009 11:51 AM



  2. I agree with Jason. But still most of the users use these services coz they are easy to use.

    Installing "stuffs" always scares a user. People who share links with friends generally share stuffs leading to some you-tube videos like JK wedding or to some fun articles/latest news. When they use a service like Twitter there are two factors which forces a user to click on a link....
    1. The guy is my friend
    2. Twitter is pretty cool n this link doesn't come from bots where "followers" as pretty less than "following"....

    Security is important but in sites like these FUN always precedes it. So even if the link is a phishing link but if it has come from my best friend or family, I am going to click it anyway coz I don't want to miss the expected fun.

    I was wondering why twitter doesn't provide link system, never liked "bit.ly..." coming where I can use some other words.

    Users like any customers don't have much time.


     Posted by: Shivul Pradhan Author Profile Page | August 19, 2009 12:28 PM



  3. Also worth mentioning are the various Wordpress plugins that can be installed that do the same thing.

    http://wordpress.org/extend/plugins/search.php?q=short+url

    Here is a stand-alone script that comes with a WP plugin:

    http://yourls.org/

     Posted by: sull Author Profile Page Posted on FriendFeed   | August 19, 2009 12:38 PM



  4. While I agree with Jason, there is still a demand and no matter what application is developed for what ever need there is, there will always be those who take inappropriate advantage of the system.

    Posted by: Work From Home | August 19, 2009 12:45 PM



  5. You need to check out Shaun Inman's Lessn http://shauninman.com/archive/2009/08/17/less_n

     Posted by: Gil Author Profile Page | August 19, 2009 1:32 PM



  6. I think YOURLS is the most credible open-source URL shortening tool. It also comes bundled with a WordPress plugin. The ones covered here are from questionable authors that nobody has ever heard before. YOURLS is from two very popular WordPress plugin authors, so, it's a way more trustworthy code to put on your server, I think.

    Posted by: Nikolay Kolev | August 19, 2009 1:35 PM



  7. Having control over your short links is indeed the most important reason to run an own URL shortener. There are also some hosted URL shortening services around. We just published an overview on our blog:

    http://iwantmyname.com/blog/2009/08/10-tools-to-run-an-url-shortener-on-your-own-custom-domain.htm

    Posted by: Timo Reitnauer | August 19, 2009 2:22 PM



  8. The madness needs to stop. Outside of Twitter these URL shorteners have NO application and mess up the web. STOP!

    Posted by: anon | August 19, 2009 2:44 PM



  9. Surely the ideal solution is actually that twitter moves forward a bit, allow any part of the tweet text to become a link in the same way we are all used to with html. That way we can go back to the way things work best where we're not creating duplicate links to the same content, we can mouseover the link and our browser conveniently tells us where its going as opposed to nobody having a clue before blindly clicking. This simple move by twitter would perhaps be a bit too much progress for some to handle but it would sure as hell make it all a lot easier!

     Posted by: Duncan Barnes Author Profile Page | August 19, 2009 2:50 PM



  10. I've been looking to make my own url shortener and one of these could be perfect :D I do already have custom short urls on my blog via a plugin for wordpress, but I've wanted to extend that to any urls I want to share. Why? I pay a lot of attention to my own browsing habits to help with developing my own site or even just to enhance sharing links, and I noticed I pay far more attention to short urls I don't recognise or that you can tell belong to the person sharing them (eg it's got their name in it). I also prefer to have control over my links and know the service won't suddenly be pulled.

    Posted by: Gaby | August 19, 2009 2:51 PM



  11. I guess the advantage of bit.ly lies a lot in the statistics it provides about the clicks. Most use it to determine the CTR of the links they post. If that can be provided for then using Bit.ly is a bit useless.

    Posted by: Sujay | August 19, 2009 2:59 PM



  12. http://www.tiny.cc/ easy tiny url you can bookmark

    Posted by: Lisa HJ | August 19, 2009 3:39 PM



  13. Thanks for all the feedback everybody.

    I came across lessn just after I posted this. Big fan of Shaun Inman's other stuff so this must be worth trying out.

    Going to try out some of the WP plugins as well. Thanks!

     Posted by: Frederic Lardinois Author Profile Page | August 19, 2009 9:32 PM



  14. I registered a domain for my site, http://cssn.in/ja/, just to do short urls and I use the Link Shortcut WP plugin to generate the uid.

    Posted by: Ryan | August 19, 2009 9:48 PM



  15. If you are using Google Apps then you can enable url shortening service in your dashboard. Check Google Short Links http://bit.ly/VWwjA

    Posted by: thejeshgn.com Author Profile Page | August 19, 2009 9:50 PM



  16. For all your programmers: We posted a article a while ago on how to make your own TinyUrl's: http://nostylesheets.com/2009/06/18/db-ids-to-readable-urls-as-in-tinyurl-youtube/

    Posted by: Nostykesheets.com | August 19, 2009 11:18 PM



  17. I run my own short url site http://ziprl.com please take a look and feel free to use it.

    Posted by: steve | August 20, 2009 4:05 AM



  18. steve.... your service is not with 301 redirect and it is with adds... I don't like this... I prefer using http://urloo.com, because it has 301, no ads and it's absolutely free.

    Posted by: Ignas | August 20, 2009 4:20 AM



  19. great stuff; we just discussed build our own link shortener earlier this week...

    Posted by: themashazine | August 20, 2009 7:13 AM



  20. Or there's the just released urlShort 2.0.0, which offers many of the features of popular short URL services like bit.ly in a free, open source package. http://mavrev.org/urlshort

    Posted by: Matt | September 30, 2009 8:20 PM



Leave a comment

Optional: Sign in with Connect Facebook   Sign in with Twitter Twitter   Sign in with OpenID OpenID  |  
RWW SPONSORS


FOLLOW @RWW ON TWITTER

ReadWriteWeb on Facebook



TEXT LINK ADS