Shorty – Your own TinyURL generator

Khoi Vinh recently announced an awesome utility for anyone who frequently passes long URLs out to contacts. The service, known as Shorty, is a self-hosted alternative to URL shortening services like TinyURL or URL123. Shorty is self hosted. This means that any long URLs you pass through the utility will be prefixed with your own domain.

The critical difference between Shorty and TinyURL is that Shorty resides on your server. You install it (all you need is a MySQL database and PHP) and you then have the power of TinyURL and its ilk, but rather than being tied to a third party, it’s a part of your brand.

shorty screenshot

Seeing as though Shorty – a self hosted solution – was too enticing to pass-up, I quickly downloaded the latest public beta release for comparison. The installation was a breeze:

  • Create or utilize an existing database (recommend that you create a new one). Dreamhost users, log into the DH Panel, navigate to Goodies > Manage MySQL > Create a new MySQL database. Edit the configuration.php file within the distribution.
  • Upload the ‘shorty’ directory to your web server.
  • Run the included installer
  • When prompted, enter your desired user account details.
  • For those that receive an error reporting a missing .htaccess file, Reed has noted a small tip for adding the required rewrite rules.
  • As directed, remove the _install.php file from the directory for security reasons.

Once you’ve logged into your local installation of Shorty, you’ll be presented with three tabs: Auto, Keywords, and Random. Each of these tabs facilitates the process of shortening long URLs into shorter, more manageable alternatives.

  • Auto – Specify the URL to be shortened, add a keyword to the URL structure, and select ‘Get Shorty’ to receive a shortened URL with the specified keyword. You can opt to elect that Auto be the preferred Shorty method for shortening URLs.
  • Keywords – Enter multiple keywords to be included for shortened URLs. Again, users may opt to elect ‘Keywords’ as the preferred URL shortening method.
  • Random – The plain vanilla method of shortening URLs. Simple paste the URL to be shortened and receive a ‘Shorty’ version. Probably the best choice for those in search of a local version of TinyURL or the like.

In addition to offering users with a means in which to create clean, short, and concise links, Shorty offers a make-shift solution for tracking link usage. Users who have Shorty installed locally can check out the ‘Admin’ panel which offers a running list of Shorty converted URLs complete with livesearch to find specific links.

short link tracking admin panel

Despite being a beta release, Shorty is rock solid. Gone are the days of relying on third-party URL shortening services. Hello Shorty, where have you been all this time? Download your own copy of Shorty and continue increasing the exposure of your own domain while passing out URLs. I am certain that third-party URL shortening service will cease to profit or exist thank to Shorty.

Informative read? Consider a healthy digg to spread the word concerning this fantastic self-hosted URL shortening solution.

Discuss - 43 Comments

  1. Brendan says:

    Nice find Mr Punsalan.

    Screw .htaccess rewrites – this is much nicer to drive. 🙂

  2. Reed Morse says:

    A blank .htaccess file will cause Shorty to break 😉

    And just as clarification, the Auto method extracts the domain name out of your url, and then appends the keyword if you supply one. But you don’t have to supply one if you don’t want to 🙂

    I’m glad you’re enjoying the program!

  3. Thanks for this! Great utility which will make the many links on my website much nicer.

  4. Poldo says:

    Thank you for sharing, Derek. And thanks to the author of this tool!

  5. Reed Morse says:

    You’re welcome.

  6. Wow, this sures comes in handy sometimes ;). Thank you for a great share!

  7. Derek says:

    [quote comment=”5881″]A blank .htaccess file will cause Shorty to break ;)[/quote]

    What’s the workaround for those that run into the error message that an .htaccess file is missing?

  8. Reed Morse says:

    [quote comment=”5888″]
    What’s the workaround for those that run into the error message that an .htaccess file is missing?[/quote]
    Upload the .htaccess file included with the package? If you’re using Transmit, you can view hidden files by going to View > Show Invisible Files.

    Or you can just put this in the blank .htaccess file you created:

    RewriteEngine on
    RewriteCond %{REQUEST_URI} !((.+\..+)|(^/[a-z0-9_-]+/$)|(^/[a-z0-9_-]+$)) [NC]
    RewriteRule (.*)$ forward.php [QSA,L]

    That’s three lines, be sure to eliminate the line break on the second line.

  9. Derek says:

    Ok. Thanks for the clarification. I guess I had overlooked the fact that Transmit may very well have overlooked the required .htaccess file. Thanks. for that clarification. Post updated.

  10. Reed Morse says:

    Yup, the .htaccess file is kinda confusing. We’ll have to think of a way to make it a bit easier for the 1.0 release.

    Thanks for the glowing (and quick!) review! Pau and I have been coding and re-coding for months, and it’s wonderful to see the program finally being used and enjoyed.

  11. Derek says:

    Well the utility is definitely welcomed. Any thoughts on the yet to be released Sidepath project? From what I know thus far, the service will apparently allow users to transform messy URLs into shorter more manageable version using your own domain.

  12. Reed Morse says:

    I haven’t heard of it before. Seems interesting, I look forward to trying it out.

    Copy cats 🙂 🙂

  13. Derek says:

    Ha. Not sure if anyone can call them copy cats 😉 They’ve been in private beta for some time. Hopefully I’ll have a nice comparison of the two up soon.

  14. Reed Morse says:

    Sure! I’m excited to see what they have to bring to the table.

  15. Derek says:

    Does anyone care to shed their opinion concerning the possible affects of using your main domain as a URL shortening / redirecting service on your overall pagerank?

    How will Google calculate PR based on the scenario: Google crawls > Immediately redirected to Will Google read this as some type of spamming method?

  16. […] In two short weeks, Shorty, a self-hosted alternative to services such as TinyURL or URL123, has proven itself to be an invaluable asset in content deployment and link tracking. Check out my previous review of the utility: Shorty – Your own TinyURL generator. […]

  17. […] The most recent offense? My post concerning the recently released Shorty self-hosted URL shortening utility: Shorty – Your own TinyURL generator. […]

  18. […] A while ago I read this post at 5thirtyone. Here, Derek reviews a server application that is basically your own version of TinyURL. It’s called Shorty. I finally managed to find the time to install it and I have to say, it works real well. I had some problems getting it to work at first but after a quick visit to the support forums, I quickly figured out the problem. Try it out for yourself and let me know what you think. […]

  19. zzap says:

    Wow, this works great! Thanks Derek.

  20. suleiman says:

    While this is truly cool, I really want to know whether or not this provides a means to automatically shorten posts posted to in comment boxes such as these on blogs.

    I run a blogging site and would love to have that abilitiy built-in.