Resources on the internet are referenced by a URL (uniform resource locator), more commonly called the 'web address'. The URL contains information about where the resource can be found and how it is to be loaded. Due to the quantity of data held by many reference sites, pages often sit within a complex hierarchy defined by the designer, so a recent BBC News story on cricket is referred to as:
Many large websites (such as online shopping services) now use database technology to retrieve the information required, adding complex search strings and user information into the URL that references a product. These URLs can be very difficult to type accurately form a printed text and are very hard to remember.
Long URLs can break across two lines in plain text message systems that use a limited line length (including some fairly widely used email clients), confusing recipients who fail to realise that they did not copy the complete address into their browser. Online texts generally put the URL behind a hyperlink, such as cricket story, so the user only need to click the link rather than type the address, but this is entirely unhelpful in print publications. In micro-blogging services (see TechNews 03/09) like Twitter, long URLs may take up most of the characters permitted in a 'tweet' (single message).
URL shortening is a process that replaces a more direct reference to a resource with an 'intermediate' web address formed from as few characters as possible. When a user types in the shortened address, the browser looks this page up and tries to load it, but (commonly) the server for that address detects a '301 redirect' and passes the browser on to the location of original resource that the user wanted to view. (A 301 redirect, which is implemented in a variety of ways on different types of server, contains information to show that the page has been 'permanently moved' to a new address.)
One of the earliest services was TinyURL.com, but a whole generation of contenders has emerged with even shorter domain names, like Bit.ly, Br.st, Ow.ly and Tiny.cc. (Some of these domain names are only five characters long, compared with TinyURL's 11 characters, leaving as many as six more characters for the micro-blogger to use in a comment related to the shortened URL.)
The length of the shortened URL is determined by the shortening algorithm, as well as the length of the domain name. The part of the address after the domain name should be a unique key that the service associates with the original address. The short URL http://bit.ly/IupcX links to the cricket story above, using 'IupcX' as the key.
A range of algorithms using sequential references, 'hash' functions and random characters can produce the key. The choice of characters used affects the complexity of the key: a key of six characters selected from 26 lower case letters produces almost 309 million possibilities, whereas including capitals and numerals as well yields nearly 57 billion. (26^6 compared to 62^6.) Changing the number of characters in the key will also have a dramatic effect on the total URLs that can be shortened. Services (for example Tinyarro.ws) utilising Unicode, which introduces characters from a wide range of international scripts, could provide 65,536 possibilities (or more) for each character in the key, but this may both confuse users and create incompatibility with some software.
The short domain names used often relate to countries that are less economically developed, or which some may consider less secure. For example, .cc refers to the Cocos Islands, .gd is Grenada and .ly is Libya. (County codes from domain names can be looked up using the official Internet Assigned Numbers Authority (IANA) Root Zone Database.)
There are a number of open source scripts that web masters can install on their own servers to shorten URLs - Brian Cray, a Web 2.0 developer, provides an example on his blog. One developer has stated his intention to put his Tr.im service into the public domain as an open source project, although how it will be managed remains unclear.
A number of social bookmarking and other web 2.0 services, such as Digg, FriendFeed and the virtual world Second Life, now offer their own embedded shortening functions when users opt to 'share' content over social networks. New picture and video hosting services are also springing up that provide short URLs for content, often posting addresses as messages in Twitter.
Adding value to shortened URLs
Most of the popular shortening services provide simple plug-ins that can be added to the 'links' or 'bookmarks' bar in most widely-used browsers, so that users can click an icon and have the URL of the current page shortened. The websites for URL shorteners often provide statistics and a 'history' of how a particular URL has been used, although they may require users to be logged in to the service first. A number of third party applications now take advantage of this: before displaying the destination URL, they provide further information to users to help them decide whether to follow a link. Appending '+' to the URLs of some services generates this information directly. (For the cricket story: http://bit.ly/IupcX+.)
Many services now include an option for the user to define a key word rather than the automatically generated key, so http://bit.ly/cricketstory should also lead to the BBC cricket page. These links may not be as short as the default key, but convey more information (if defined sensibly) and are less likely to be mistyped. They also tend to be offered via the service's website, encouraging traffic to the site, which may form a potential income stream where advertising is displayed.
The servers hosting the URL shortening service can themselves become infected by malware. (For example, Cli.gs in June 2009.)
When resources referring to information on the internet are shared, varying institutional and authority filtering policies may render short links unusable for other users
Users may be concerned about privacy, especially as the destinations viewed by logged-in users can be tracked
Reliability and long term viability of the services need to be considered (including those provided in-house). Many services remain in a semi-permanent 'beta' (experimental) phase and 'linkrot' may be generated when a service provider closes or chooses to re-use existing links.
Most services are currently offered for free, but investors may demand a return for their money by insisting on advertising (some of which could be inappropriate) or moving attractive parts of the service into paid-for 'premium' accounts
The 'jumble' of letters can cause difficulties for users of assistive technologies, such as screen readers.
Addressing the future
Some sites use so-called 'blacklists' of URLs known to host malicious or undesirable content. When a request to shorten a URL is passed to the server, it first compares to (for example) Google's Safe Browsing list, before shortening the URL. Shortened URLs can be expanded and the contents viewed through some of the shortening services, as well as third party applications. It is often possible to set an option (stored in a browser cookie) so that the server responsible for expanding the URL automatically previews the destination address or content. However, this intermediate step may be a hindrance to frequent users, deterring them from regularly using previews.
Using services that embed precautions of these types can make the experience more secure. Some institutional or regional broadband consortium (RBC) filters may be configured to perform the same types of checks on redirected links before content is passed back to users. Web designers and educators managing web projects need to consider carefully how URLs are created: where an in-house database is used, an appropriate length of 'native' URL should be considered to avoid the temptation for users to shorten URLs as a matter of course.
The number of shortened links encountered is liable to increase and teachers and researchers are more likely to find shortened URLs used in publications and assignments, as well as in Web 2.0 environments. User education regarding appropriate contexts in which shortened URLs are appropriate and how they work may be appreciated by both staff and students. This guidance could be formalised in some institutional policies, especially guides to 'house style'.
Please note: although Bit.ly has been used extensively in this article, no specific endorsement or guarantee of service should be implied. It has been used as an example of one of the many services available.