There are lot of URL shortner's online. I want to know how they work? What is the mechanism done behind it?
I just was writing http://www.codeitwell.com/url-shortener-for-wordpress.html when you plan to ask such question. In my opinion a value stored in db against each URL
Web applications often include lengthy descriptive attributes in their URLs which represent data hierarchies, command structures, transaction paths and session information. This practice results in a URL that is aesthetically unpleasant and difficult to remember, and which may not fit within the size limitations of Micro blogging sites. URL shortening services provide a solution to this problem by redirecting a user from a longer URL to a shorter one. Avoid URL garbling Currently, web developers tend to pass descriptive attributes in the URL to represent data hierarchies, command structures, transaction paths and session information. This may result in a URL that is aesthetically unpleasant and difficult to remember. Copying a URL that is hundreds of characters long can make the URL garbled. Then a short URL is useful to copy on an e mail message or forum post. Use the smallest space possible: on a twitter or instant message status, even a 60 character long URL can be too long. A URL shortener can make short URLs such as http://zeek.us/s89UG (20 characters), http://tinyurl.com/gf65th (25 characters) or http://lnk.sk/acgz (18 characters) or http://tr.im/o65Tg (also 18 characters). In Twitter http://www can be replaced by www and 7 fewer characters can be used. Reading aloud To accomplish this objective any URL shortening service can be useful. However those which let the user choose the URL are more suited for this task. Some shortening services, such as socuteurl.com, generate URLs that are human-readable, though the resulting strings are longer than those generated by a length-optimized service. Manipulating visitors URL shortening is a special kind of URL redirection, which is sometimes used in pranks, phishing or affiliate hiding. For example tiny url.com/ha56k0k redirects to the shock site goatse.cx in a prank. Some of these services (br.st, for example) have started filtering all shortened links through services like Google Safe Browsing.
To answer the OPs question, these services use 301 redirects to redirect you to the correct page. This prevents the short URLs from being indexed as the search engines will correctly index the final destination URL. I too was thinking about this in the last several days and have been coding my own tiny url service to run on my own domain. This way I maintain the equity of my own domain when posting short links. - Ben
Hello, URL shortening is a technique on the World Wide Web in which a uniform resource locator (URL) may be made substantially shorter in length and still direct to the required page. This is achieved by using a redirect on a domain name that is short, which links to the web page that has a long URL. --- Regards, Mia Luzzatto