Insights about URL Shorteners

If you tweet, you use (or should use) a URL shortening service. Simply put, a shortening service gives you a small URL which lands on the page you want. Simple, and very effective when your aim is to fit as much as possible in 140 characters. The ones I use most are Tinyurl and Bit.Ly.

How do they work?

A CodingHorror blog post from 2007 shows how URL shortening might work. The theory is that each time you ask to shorten a URL, the site makes a hash value for that site and enters it in the database. But won’t the site run out of unique hash values to give as URLs? Well, lets do the math :

The sites can use the following characters in the URL:

  • 26 lower case letters
  • 26 upper case letters
  • 10 numbers (0-9)
  • underscore and hyphen

Total = 64 different characters.

So a URL shortening service can create a lot of URLs. But how many exactly? Its basically permutation.

The total combinations they can have will be : (64^1) + (64^2) + (64^3) + …. where each power represents the number of total characters in the shortened URL.

So, when the number of URLs possible with 6 characters (approx. 68 billion) is over, the shortening service introduces one more character. We can see this clearly when comparing the earlier blog post. Back in 2007 Tinyurl hashed to a URL with 6 characters. Now, it converts to URLs with 7 characters. They can now give approx 4.3 trillion URLs from the service.They then possibly go sequentially through the hash values till they are exhausted.

What to watch-out for When Using one

When you use a URL shortener, you make one more level of abstraction between the person clicking the link and the final destination.Users need not appreciate this since the speed might be compromised.

Another huge problem is the fact that the link, once shortened, doesn’t indicate anything about the final destination. When phishing and other such dark arts are so prevalent, this will be viewed with suspicion (and rightly so). To get around that problem, most shorteners provide paid services which let you create shortened links which resemble the landing page in some way. That is, of course, considering that unique name you want is available.

Making one Yourself

Making a URL shortening service is a very challenging thing. You need a system which has to be super reliable, online at all times, is queries endlessly and contains trillions of data items that need to be used for redirection at speeds which don’t let the user feel the difference.

How do they Make Money?

This is a very interesting point. Most of them make their money from Link-Analysis. You shorten your URL and drop the link in your twitter upadte. When someone clicks on the link, they are redirected through the shortener’s database and thus get information about the click. They can then give detailed analysis on the geography, time and service from where the click came.

This has become a pretty good money spinner thanks to the recent scramble by advertisers and PR personnel to get themselves heard on Social Media. The link-analysis is being used as the proof with which they can convince their pay-masters about the effectiveness about a social advertising campaign.

Then of course their is the branded shortening services which helps users to (somewhat) identify what they’ll be clicking into.

Well, that’s the top down about URL shorteners I guess.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s