YOURLS: Your Own URL Shortener

I have been noticing an interesting trend on Twitter and other social media sites. Larger online publications are starting to set up their own private URL shorteners for their content. Ars Technica has arst.ch, TechCrunch has tcrn.ch, and Oneforty has 14t.me, for example. Oh, and The Onion has their own short URLs under their onion.com domain.

Why are they doing this? To solve two problems that URL shorteners often introduce: The first being that they prevent you from seeing what URL you’re going to land on, which could contain malware of some other undesirable content. Having a private, branded shortener domain adds a level of trust. The second issue is that a few URL shorteners have closed their doors, or announced that they were going to. Handling them internally helps to mitigate that risk, since everything is under the publishers’ control.

How do you set up your own URL shortener? The first step is to get a short domain to use. Domai.nr is a great tool to provide inspiration. Once you have a domain, however, you have to make a decision. Do you want to use something like Bit.ly Pro, or do you want to host everything yourself? If you fall into the latter camp, you may want to give YOURLS a try.

YOURLS, or Your Own URL Shortener, is a PHP script by WordPress plugin developers Lester “Gamerz” Chan and Ozh Richard. It lets you setup a nearly-instant URL shortener. All you have to do is download and configure it on your web server. It even collects statistics.

You can set YOURLS up to be either private or public, and it includes features you would usually expect from a third-party URL shortener, such as:

  • A bookmarklet that you can use to create new short URLs
  • An API that you can use to add YOURLS support to applications like Tweetie 2.
  • Click reports, referrer tracking, visitors’ approximate geo location.
  • The ability to pick custom keywords instead of using sequential URLs.

There’s even a plugin that you can use to integrate YOURLS into WordPress. But if you want an alternative plugin, one that provides more Twitter-oriented features, my Tweetable plugin now supports YOURLS.

I now have my own shortener powered by YOURLS, ntgo.us, which I intend to eventually use across my various websites.

  • http://news.runtowin.com Blaine Moore

    I’ve been using YOURLs for a while – it’s a great little piece of software.

    Also – I want to thank you for mentioning the stats. I’m running an older version of the software and didn’t realize they had better tracking in the upgraded version.

    I’m updating it as we speak…

    • http://www.webmaster-source.com Matt

      I hope they implement an update-checking function in a future release. Coming from two WordPress developers, you’d think it would be a fairly obvious function for them to add…

      • http://news.runtowin.com Blaine Moore

        That would be a great feature…

  • http://www.thepatri0t.net/ The Patri0t

    Interesting, shall try out the WordPress plugins on my blogs.

  • http://www.igxr.com John Davis

    I installed it on my site the other day, I had spammers using it within 24-48 hours. I put captcha in place and it has stopped the bad guys. Check it out here live:

    http://www.igxr.com

    If you have any questions on how to setup captcha on it please feel free to contact me through my site.

    • http://www.runtowin.com Blaine Moore

      I don’t have to worry about spammers because I don’t have a public interface for it. If you don’t know the hidden page or have an admin login you can’t use mine. Which is handy.

      • http://www.webmaster-source.com Matt

        That’s how I use it, too.

  • http://bibibhas.cin Bibhas Chandra Debnath

    URL Shortening at your finger tip. :) | Lazy Blogger

  • http://www.goturl.net Jim

    Excellent article! We are linking to this particularly great content on
    our site. Keep up the good writing.

  • http://taimoorsultan.com/ Taimoor

    Indeed, very useful and interesting writing. Thank you :D
    I recently wrote about Displaying Advertisements before redirection in Yourls. You should read it. :)
    http://taimoorsultan.com/show-.....in-yourls/
    Thanks! Happy New Year

  • http://www.ddenti.com/ Valarie

    Heya! I realize this is sort of off-topic but I had to ask. Does operating a well-established website such as yours take a lot of work? I am completely new to operating a blog but I do write in my diary daily. I’d like to start a blog so I can share my experience and feelings online. Please let me know if you have any ideas or tips for brand new aspiring bloggers. Thankyou!