Create Short URL’s and Track Clicks On Your Site with Shorty

shorty-logoWhen it comes to shortening a long URL, most people will think of TinyURL or one of the hundreds of other URL shortening sites. Most, if not all, of these sites take a long URL and generate a short URL based on their domain name.

For example, if you use TinyURL to shorten the long URL http://www.makeuseof.com/this-is-a-long-url-and-I-want-to-shorten-it.html, you will get something like http://tinyurl.com/2h4kud. There is absolutely nothing wrong with this but, what if, instead of using TinyURL, you can do it on your own server and brand it with your domain name?

Shorty is a simple tool for creating shorter, human- readable links from long URLs. You can install Shorty on your server, so the links are based on your own domain name and it never goes away. You can also manage your links and see how often people click on them.

Advantages of creating a short URL with your domain name

There are several advantages of creating short URL on your own server:

1. Branding your own domain name

When you use services like tinyurl.com, you are promoting tinyurl rather than your own domain. Your readers/visitors/followers have absolutely no idea where the link leads to and which site it ends up with. With your own domain name, you can better brand yourself and at the same time give your readers a clear direction where the link is leading them to.

2. The short URL is your own property and does not go down with the third-party site

When you create short URL’s on your own server, the URL is present as long as your server is running. If you use third party services, when their site is down, your short URL goes down with them. The more URL’s you created with them, the more risk you subject yourself to.

3. Give a meaningful phrase rather than a random string of numbers

If I want to shorten a URL such as http://www.makeuseof.com/tag/6-ways-to-turn-your-iphone-into-an-external-hard-disk/, which one is more meaningful: http://tinyurl.com1/3x4fphre or http://www.makeuseof.com/s/iphone-drive?

4. Statistical purpose

Services such as Tinyurl does not come with a tracking code and you are not able to find out how many people clicked that link. When you create it on your own server, you can implement a tracking script to monitor the number of click throughs.

In Shorty, there are three different ways that you can use it to generate short URL’s:

Auto

The tool automatically grabs a word from the long URL and appends it to the end of your domain name. This is useful if you want a quick and easy way to generate a short URL.

shorty-auto

Keyword

Using the Keyword option, you can customize your short URL with meaningful keywords or short words that you can identify the link with. For example, you can customize the long URL: http://www.makeuseof.com/this-is-a-long-url-and-I-want-to-shorten-it-with-shorty.html to http://www.makeuseof.com/s/shorty.

shorty-keyword

Random

Random allows you to generate short URL’s the TinyURL way. It will generate a short URL with random alphabets and numbers.

shorty-random

Admin

The Admin page is where you can modify/delete your short URL’s and check how many times your links have been clicked on.

shorty-admin

To install Shorty, you need to have Apache, MySQL and PHP installed on your server. As a rule of thumb, if your server can run WordPress or any other PHP-based applications, it is good enough to install Shorty.

In conclusion, if you are constantly using third party sites to generate short URLs, you might as well use Shorty since it is easy to install, use and you are able to market your domain at the same time. However, if you just want to create short URLs (that link to other sites) quickly so you can post in Twitter, then TinyURL (or any other URL shortening sites) might be the one to go for.

Did you find this useful? Share it with others

Damien Oh

Damien Oh is an all-out technology geek who loves to tweak and hack various operating systems to make life easier. Check out his blog at MakeTechEasier.com where he shares all the tips, tricks and tutorials.

Similar Stuff

The comments were closed because the article is more than 180 days old.

If you have any questions related to stuff mentioned in the article or need help with any computer issue, just ask it on MakeUseOf Answers.

Hide 20 Comments

  • MoscowModder December 22, 2008

    How do you install Shorty? I copied the folder to htdocs and when I go to http://{server}/shorty/index.php it gives me an error 500 (Server error).

    Any ideas?

  • MoscowModder December 22, 2008

    {Update}

    The instructions tell me to run the _install.php from a web browser, but even that gives me the error 500.

    Help?

  • Damien Oh December 22, 2008

    To install shorty, first create a database on your server (using phpmyadmin). Next, open up the configuration.php file in the shorty folder and edit the database information. Upload the whole folder to your server. On your browser, go to http://your-server.com/shorty/_install.php. It will prompt you to create your username and password.

  • Ken March 7, 2009

    Will this shorty become resource hungry when we use it a lot? let’s say we have couple thousands of links inside the database…?

  • mike March 12, 2009

    This doesn’t work anymore..does anybody know what the problem is? The demo on their own site doesn’t work either.
    I downloaded the script and installed it..it went that far..but when i try to log in, it won’t let me.
    Anybody else have these issues?

    • Damien Oh March 12, 2009

      It works fine on my side. I have re-download and reinstall it on my server and there’s nothing wrong at all. Perhaps you want to check your installation again?

      • mike March 14, 2009

        It works in Firefox..but not in IE7..at least for me. In IE7, gives me an error..Object doesn’t support this property or method.

  • Joshua March 17, 2009

    I uploaded this many times and It works until I click on the link I made. It dosent make the directory I specify. I can’t figure out why. I have even changed permissions to 777. WHat do you think I am doing wrong?

  • Karen Goldfarb March 31, 2009

    I’m so very much not a web developer but I really like the idea of this application. I also use Apple’s iWeb templates hosted on MobileMe (Apple’s replacement for .Mac). Can I run this there? If so, can you please tell a total non-tech how to do it?

    • Damien Oh April 2, 2009

      @karen: I have completely no experience with Apple’s iWe and MobileMe, so I won’t be able to tell you whether it works or not. I will help you keep a lookout. Once I got the answer, I will inform you.

  • may moc thiet bi machine tool September 22, 2009

    Having thousands of links inside the database is not resource intensively. But if all the links are accessed by a lot of people (several thousands or more) at the same time, it could cause a heavy burden on the CPU.

  • Gary Taylor November 18, 2009

    Shorty would be great if you could use it with IE (which is still used by a large number of people). It’s easier to use one of the tutorials I’ve found elsewhere and create the files from scratch. Sorry!

    Gary

  • Ken March 9, 2009

    Thanks for your prompt reply. That’s is the problem. I have thousands of product links and the CTR is pretty high. I’ve seen my MYSQL and CPU perform at a high level (which is risky) so I was search for alternative to Shorty. Please do email me if you have one (especially for site with high traffic).

    ken[at]kenxu.com

    Thanks!