
URL shortening is a technique on the
World Wide Web
The World Wide Web (WWW or simply the Web) is an information system that enables Content (media), content sharing over the Internet through user-friendly ways meant to appeal to users beyond Information technology, IT specialists and hobbyis ...
in which a
Uniform Resource Locator
A uniform resource locator (URL), colloquially known as an address on the World Wide Web, Web, is a reference to a web resource, resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific t ...
(URL) may be made substantially shorter and still direct to the required page. This is achieved by using a
redirect
Redirect and its variants (e.g., redirection) may refer to:
Arts, entertainment, and media
* Redirect (album), ''Redirect'' (album), 2012 Christian metal album and its title track by Your Memorial
* Redirected (film), ''Redirected'' (film), a 20 ...
which links to the
web page
A web page (or webpage) is a World Wide Web, Web document that is accessed in a web browser. A website typically consists of many web pages hyperlink, linked together under a common domain name. The term "web page" is therefore a metaphor of pap ...
that has a long URL. For example, the URL "" can be shortened to "". Often the redirect
domain name
In the Internet, a domain name is a string that identifies a realm of administrative autonomy, authority, or control. Domain names are often used to identify services provided through the Internet, such as websites, email services, and more. ...
is shorter than the original one. A
friendly URL may be desired for messaging technologies that limit the number of
characters in a message (for example SMS), for reducing the amount of typing required if the reader is copying a URL from a print source, for making it easier for a person to remember, or for the intention of a
permalink. In November 2009, the shortened links of the URL shortening service
Bitly were accessed 2.1 billion times.
Other uses of URL shortening are to "beautify" a link, track clicks, or disguise the underlying address. This is because the URL shortener can redirect to just about any web domain, even malicious ones. So, although disguising of the underlying address may be desired for legitimate business or personal reasons, it is open to abuse.
Some URL shortening service providers have found themselves on spam
blocklists, because of the use of their redirect services by sites trying to bypass those very same blocklists. Some websites prevent short, redirected URLs from being posted.
Purposes
There are several reasons to use URL shortening. Often regular unshortened links may be aesthetically unpleasing. Many web developers pass descriptive attributes in the URL to represent data hierarchies, command structures, transaction paths or session information. This can result in URLs that are hundreds of characters long and that contain complex character patterns. Such URLs are difficult to memorize, type out or distribute. As a result, long URLs must be copied and pasted for reliability. Thus, short URLs may be more convenient for websites or hard copy publications (e.g. a printed magazine or a book), the latter often requiring that very long strings be broken into multiple lines (as is the case with some
e-mail
Electronic mail (usually shortened to email; alternatively hyphenated e-mail) is a method of transmitting and receiving Digital media, digital messages using electronics, electronic devices over a computer network. It was conceived in the ...
software or
internet forums) or truncated.
On
Twitter
Twitter, officially known as X since 2023, is an American microblogging and social networking service. It is one of the world's largest social media platforms and one of the most-visited websites. Users can share short text messages, image ...
and some
instant messaging
Instant messaging (IM) technology is a type of synchronous computer-mediated communication involving the immediate ( real-time) transmission of messages between two or more parties over the Internet or another computer network. Originally involv ...
services, there is a limit to the number of characters a message can carry however, Twitter now shortens links automatically using its own URL shortening service, , so there is no need to use a separate URL shortening service just to shorten URLs in a tweet. On other such services, using a URL shortener can allow linking to web pages which would otherwise violate this constraint. Some shortening services, such as , , and can generate URLs that are human-readable, although the resulting strings are longer than those generated by a length-optimized service. Finally, URL shortening sites provide detailed information on the clicks a link receives, which can be simpler than setting up an equally powerful server-side analytics engine, and unlike the latter, does not require any access to the server.
URLs encoded in two dimensional barcodes such as
QR code are often shortened by a URL shortener in order to reduce the printed area of the code, or allow printing at lower density in order to improve scanning reliability.
Registering a short URL
Some websites create short links to make sharing links via instant messaging easier, and to make it cheaper to send them via SMS. This can be done online, at the web pages of a URL shortening service; to do it in batch via bulk upload with tools like CSV importer or on demand may require the use of an
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
.
A few well-known websites have set up their own URL shortening services for their own use for example, Twitter with t.co, Telegram with t.me, Google with g.co, and GoDaddy with x.co.
Techniques
In URL shortening, every long URL is associated with a
unique key, which is the part after its
top-level domain name. For example, has a key of , these keys are case-sensitive most of the time and using the wrong case may lead to a different destination URL. Not all redirection is treated equally; the redirection instruction sent to a browser can contain in its header
HTTP response status codes such as 301 (moved permanently), 302 (found), 307 (temporary redirect) or 308 (permanent redirect).
There are several techniques to implement URL shortening. Keys can be generated in
base 36, assuming 26 letters and 10 numbers. In this case, each character in the sequence will be . Alternatively, if uppercase and lowercase letters are differentiated, then each character can represent a single digit within a number of
base 62 (26 + 26 + 10). In order to form the key, a
hash function
A hash function is any Function (mathematics), function that can be used to map data (computing), data of arbitrary size to fixed-size values, though there are some hash functions that support variable-length output. The values returned by a ...
can be made, or a
random number generated so that key sequence is not predictable. Or users may propose their own custom keys. For example, can be shortened to .
Not all URI schemes are capable of being shortened as of 2011, although URI schemes such as , , , , , , , , , , , , , , , and are being addressed by such services as URL shorteners. Typically,
and URLs are not supported for security reasons (to combat attacks like
cross-site scripting
Cross-site scripting (XSS) is a type of security vulnerability that can be found in some web applications. XSS attacks enable attackers to inject client-side scripts into web pages viewed by other users. A cross-site scripting vulnerability may be ...
and
session hijacking). Some URL shortening services support the forwarding of URLs, as an alternative to
address munging
Address munging is the practice of disguising
an e-mail address to prevent it from being automatically collected by unsolicited bulk e-mail providers.
Address munging is intended to disguise an e-mail address in a way that prevents computer soft ...
, to avoid unwanted harvest by
web crawlers or
bots
The British Overseas Territories (BOTs) or alternatively referred to as the United Kingdom Overseas Territories (UKOTs) are the fourteen dependent territory, territories with a constitutional and historical link with the United Kingdom that, ...
. This may sometimes be done using short,
CAPTCHA
Completely Automated Public Turing Test to tell Computers and Humans Apart (CAPTCHA) ( ) is a type of challenge–response authentication, challenge–response turing test used in computing to determine whether the user is human in order to de ...
-protected URLs, but this is not common.
Makers of URL shorteners usually register domain names with less popular or esoteric
Top-level domain
A top-level domain (TLD) is one of the domain name, domains at the highest level in the hierarchical Domain Name System of the Internet after the root domain. The top-level domain names are installed in the DNS root zone, root zone of the nam ...
s in order to achieve a short URL and a catchy name, often using
domain hacks.
This results in registration of different URL shorteners with a myriad of different countries, leaving no relation between the country where the domain has been registered and the URL shortener itself or the shortened links.
Top-level domain
A top-level domain (TLD) is one of the domain name, domains at the highest level in the hierarchical Domain Name System of the Internet after the root domain. The top-level domain names are installed in the DNS root zone, root zone of the nam ...
s of countries such as
Libya
Libya, officially the State of Libya, is a country in the Maghreb region of North Africa. It borders the Mediterranean Sea to the north, Egypt to Egypt–Libya border, the east, Sudan to Libya–Sudan border, the southeast, Chad to Chad–L ...
(
.ly),
Samoa
Samoa, officially the Independent State of Samoa and known until 1997 as Western Samoa, is an island country in Polynesia, part of Oceania, in the South Pacific Ocean. It consists of two main islands (Savai'i and Upolu), two smaller, inhabited ...
(
.ws),
Mongolia
Mongolia is a landlocked country in East Asia, bordered by Russia to the north and China to the south and southeast. It covers an area of , with a population of 3.5 million, making it the world's List of countries and dependencies by po ...
(
.mn),
Malaysia
Malaysia is a country in Southeast Asia. Featuring the Tanjung Piai, southernmost point of continental Eurasia, it is a federation, federal constitutional monarchy consisting of States and federal territories of Malaysia, 13 states and thre ...
(
.my) and
Liechtenstein
Liechtenstein (, ; ; ), officially the Principality of Liechtenstein ( ), is a Landlocked country#Doubly landlocked, doubly landlocked Swiss Standard German, German-speaking microstate in the Central European Alps, between Austria in the east ...
(
.li) have been used as well as many others. In some cases, the political or cultural aspects of the country in charge of the
top-level domain
A top-level domain (TLD) is one of the domain name, domains at the highest level in the hierarchical Domain Name System of the Internet after the root domain. The top-level domain names are installed in the DNS root zone, root zone of the nam ...
may become an issue for users and owners, but this is not usually the case.
Services may record inbound statistics, which may be viewed publicly by others.
Expiry and time-limited services
While many providers claim their shortened URLs won't expire for as long as the service is provided, they may decide to discontinue the service at any time.
A permanent URL is not necessarily a good thing. There are security implications, and obsolete short URLs remain in existence and may be circulated long after they cease to point to a relevant or even extant destination. Sometimes a short URL is useful simply to give someone over a telephone conversation for a one-off access or file download, and no longer needed within a couple of minutes.
Some providers offer expiration on shortened URLs. This may include URLs that expire after a certain amount of time, on a certain date or after a certain number of usages.
A Microsoft Security Brief recommends the creation of short-lived URLs, but for reasons explicitly of security rather than convenience.
History
An early reference is US Paten
6957224 which describes
...a system, method and computer program product for providing links to remotely located information in a network of remotely connected computers. A uniform resource locator (URL) is registered with a server. A shorthand link is associated with the registered URL. The associated shorthand link and URL are logged in a registry database. When a request is received for a shorthand link, the registry database is searched for an associated URL. If the shorthand link is found to be associated with a URL, the URL is fetched, otherwise an error message is returned.
The patent was filed in September 2000; while the patent was issued in 2005, US patent applications are made public within 18 months of filing.
Another reference to URL shortening was in 2001. The first notable URL shortening service,
TinyURL, was launched in 2002. Its popularity influenced the creation of at least 100 similar websites, although most are simply domain alternatives. Initially,
Twitter
Twitter, officially known as X since 2023, is an American microblogging and social networking service. It is one of the world's largest social media platforms and one of the most-visited websites. Users can share short text messages, image ...
automatically translated URLs longer than twenty-six characters using TinyURL, although it began using bit.ly instead in 2009
[Wortham, Jenna (7 May 2009]
"Bit.ly Eclipses TinyURL on Twitter"
''Bits'' (blog
A blog (a Clipping (morphology), truncation of "weblog") is an informational website consisting of discrete, often informal diary-style text entries also known as posts. Posts are typically displayed in Reverse chronology, reverse chronologic ...
at ''The New York Times
''The New York Times'' (''NYT'') is an American daily newspaper based in New York City. ''The New York Times'' covers domestic, national, and international news, and publishes opinion pieces, investigative reports, and reviews. As one of ...
''). Retrieved 1 January 2011. and later developed its own URL shortening service, t.co.
On 14 August 2009
WordPress
WordPress (WP, or WordPress.org) is a web content management system. It was originally created as a tool to publish blogs but has evolved to support publishing other web content, including more traditional websites, electronic mailing list, ma ...
announced the ''wp.me'' URL shortener for use when referring to any WordPress.com blog post. In November 2009, shortened links on ''
bit.ly
Bitly is a URL shortening service and a link management platform. The company Bitly, Inc. was established in 2008. It is privately held and based in New York City. Bitly shortens 600 million links per month, for use in social networking, SMS, a ...
'' were accessed 2.1 billion times.
[Ahmed, Murad (7 December 2009)]
"New Project in Scramble To Save Vanishing Internet Links – The Internet Archive Is Fighting To Preserve Shortened Web Links Created by Free Online Services That May Be Running Out of Money"
. ''The Times
''The Times'' is a British Newspaper#Daily, daily Newspaper#National, national newspaper based in London. It began in 1785 under the title ''The Daily Universal Register'', adopting its modern name on 1 January 1788. ''The Times'' and its si ...
''. Retrieved 1 January 2011. Around that time, ''bit.ly'' and ''TinyURL'' were the most widely used URL-shortening services.
[
One service, tr.im, stopped generating short URLs in 2009, blaming a lack of revenue-generating mechanisms to cover costs and Twitter's default use of the ''bit.ly'' shortener, and questioning whether other shortening services could be profitable from URL shortening in the longer term. It resumed for a time, then closed.
The shortest possible long-term URLs were generated by NanoURL from December 2009 until about 2011, associated with the top-level ''.to'' (Tonga) domain, in the form , where represents a sequence of random numbers and letters.
On 14 December 2009 ]Google
Google LLC (, ) is an American multinational corporation and technology company focusing on online advertising, search engine technology, cloud computing, computer software, quantum computing, e-commerce, consumer electronics, and artificial ...
announced a service called Google URL Shortener at goo.gl, which originally was only available for use through Google products (such as Google Toolbar and FeedBurner) and extensions for Google Chrome
Google Chrome is a web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macOS, iOS, iPadOS, an ...
. On 21 December 2009, Google introduced a YouTube
YouTube is an American social media and online video sharing platform owned by Google. YouTube was founded on February 14, 2005, by Steve Chen, Chad Hurley, and Jawed Karim who were three former employees of PayPal. Headquartered in ...
URL Shortener, youtu.be. From September 2010 Google URL Shortener became available via a direct interface. The goo.gl service provides analytics details and a QR code generator. On 30 March 2018 Google
Google LLC (, ) is an American multinational corporation and technology company focusing on online advertising, search engine technology, cloud computing, computer software, quantum computing, e-commerce, consumer electronics, and artificial ...
announced that it is "turning down support for goo.gl over the coming weeks and replacing it with Firebase Dynamic Links" (although existing goo.gl links will continue to function). On July 18, 2024, Google announced that existing Google URL shortener URLs will stop working as of August 25, 2025. Google will add an interstitial page to warn users about this starting August 23, 2024.
Advantages
The main advantage of a short link is its brevity. Depending on the transcription used, it might be more easily communicated and entered without error. To some extent it can obscure the destination of the URL; this may be advantageous, disadvantageous, or irrelevant.
Disadvantages
Short URLs often circumvent the intended use of top-level domain
A top-level domain (TLD) is one of the domain name, domains at the highest level in the hierarchical Domain Name System of the Internet after the root domain. The top-level domain names are installed in the DNS root zone, root zone of the nam ...
s for indicating the country of origin; domain registration in many countries requires proof of physical presence within that country, although a redirected URL has no such guarantee.
Abuse
URL shortening may be utilized by spammers or for illicit internet activities. As a result, many have been removed from online registries or shut down by web hosts or internet service providers.
According to Tonic Corporation, the registry for .to domains, it is "very serious about keeping domains spam free" and may remove URL shortening services from their registry if the service is abused.
In addition, "u.nu" made the following announcement upon closing operations:
The last straw came on September 3, 2010, when the server was disconnected without notice by our hosting provider in response to reports of a number of links to child pornography sites. The disconnection of the server caused us serious problems, and to be honest, the level and nature of the abuse has become quite demoralizing. Given the choice between spending time and money to find a different home, or just giving up, the latter won out.
Google's url-shortener discussion group has frequently included messages from frustrated users reporting that specific shortened URLs have been disabled after they were reported as spam.
A study in May 2012 showed that 61% of URL shorteners had shut down (614 of 1002). The most common cause cited was abuse by spammers.
Linkrot
The convenience offered by URL shortening also introduces potential problems, which have led to criticism of the use of these services. Short URLs, for example, will be subject to linkrot
Link rot (also called link death, link breaking, or reference rot) is the phenomenon of hyperlinks tending over time to cease to point to their originally targeted file, web page, or server due to that resource being relocated to a new address ...
if the shortening service stops working; all URLs related to the service will become broken. It is a legitimate concern that many existing URL shortening services may not have a sustainable business model in the long term.[ In late 2009, the ]Internet Archive
The Internet Archive is an American 501(c)(3) organization, non-profit organization founded in 1996 by Brewster Kahle that runs a digital library website, archive.org. It provides free access to collections of digitized media including web ...
started the "301 Works" projects, together with twenty collaborating companies (initially), whose short URLs will be preserved by the project.[
]
Transnational law
Shortened internet links typically use ccTLD domains, and are therefore often under the jurisdiction of a nation other than where the service provider is located. Libya
Libya, officially the State of Libya, is a country in the Maghreb region of North Africa. It borders the Mediterranean Sea to the north, Egypt to Egypt–Libya border, the east, Sudan to Libya–Sudan border, the southeast, Chad to Chad–L ...
, for instance, exercised its control over the .ly domain in October 2010 to shut down vb.ly for violating Libyan pornography laws. Failure to predict such problems with URL shorteners and investment in URL shortening companies may reflect a lack of due diligence
Due diligence is the investigation or exercise of care that a reasonable business or person is normally expected to take before entering into an agreement or contract with another party or an act with a certain standard of care.
Due diligence ...
.
Blocking and banning
Some websites prevent short, redirected URLs from being posted.
In April 2009, TinyURL was reported to be blocked in Saudi Arabia
Saudi Arabia, officially the Kingdom of Saudi Arabia (KSA), is a country in West Asia. Located in the centre of the Middle East, it covers the bulk of the Arabian Peninsula and has a land area of about , making it the List of Asian countries ...
. Yahoo! Answers blocks postings that contain TinyURLs, and Wikipedia
Wikipedia is a free content, free Online content, online encyclopedia that is written and maintained by a community of volunteers, known as Wikipedians, through open collaboration and the wiki software MediaWiki. Founded by Jimmy Wales and La ...
does not accept links by any URL shortening services in its articles. The Reddit
Reddit ( ) is an American Proprietary software, proprietary social news news aggregator, aggregation and Internet forum, forum Social media, social media platform. Registered users (commonly referred to as "redditors") submit content to the ...
community strongly discouragesand in some subreddits, outright bansURL shortening services for link submissions, because they disguise the origin domain name and whether the link has previously been submitted to Reddit, and there are few or no legitimate reasons to use link shorteners for Reddit link submissions.
Privacy and security
A short URL obscures the target address and can be used to redirect to an unexpected site. Examples of this are " rickrolling", and redirecting to shock sites, or to affiliate websites. The short URL can allow blocked URLs to be accessed, bypassing site blocklists; this facilitates redirection of a user to blocked scam pages or pages containing malware or XSS attacks. TinyURL tries to disable spam-related links from redirecting. ZoneAlarm
ZoneAlarm is an internet security software company that provides consumer antivirus and firewall products. ZoneAlarm was developed by Zone Labs, whose CEOs were Kevin Nickel, Mouad Abid and Shahin and the Company was acquired in March 2004 by Ch ...
, however, has warned its users: "TinyURL may be unsafe. This website has been known to distribute spyware." TinyURL countered this problem by offering an option to view a link's destination before using a shortened URL. This ability is installed on the browser via the TinyURL website and requires the use of cookies. A destination preview may also be obtained by prefixing the word "preview" to the URL of the TinyURL; for example, the destination of is revealed by entering . Other URL shortening services provide a similar destination display. Security professionals suggest that users check a short URL's destination before accessing it, following an instance where the shortening service cli.gs was compromised, exposing millions of users to security uncertainties. There are several web applications that can display the destination URL of a shortened URL.
Some URL shortening services filter their links through bad-site screening services such as Google Safe Browsing. Many sites that accept user-submitted content block links, however, to certain domains in order to cut down on spam, and for this reason, known URL redirection services are often themselves added to spam blocklists.
Another privacy problem is that many services' shortened URL format is small enough that it is vulnerable to brute-force search. Many people use URL shorteners when they share links to private content, and in fact many web services like Google Maps have offered automatic generation of shortened links for driving directions that reveal personal information like home addresses and sensitive destinations like "clinics for specific diseases (including cancer and mental diseases), addiction treatment centers, abortion providers, correctional and juvenile detention facilities, payday and car-title lenders, gentlemen's clubs, etc."
Additional layer of complexity
Short URLs, although making it easier to access what might otherwise be a very long URL or user-space on an ISP server, add an additional layer of complexity to the process of retrieving web pages. Every access requires more requests (at least one more DNS lookup, though it may be cached, and one more HTTP/HTTPS request), thereby increasing latency, the time taken to access the page, and also the risk of failure, since the shortening service may become unavailable. Another operational limitation of URL shortening services is that browsers do not resend POST bodies when a redirect is encountered. This can be overcome by making the service a reverse proxy, or by elaborate schemes involving cookies and buffered POST bodies, but such techniques present security and scaling challenges, and are therefore not used on extranets or Internet-scale services.
Notable services
Open source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
and commercial scripts are also available for redirecting and shortening links, usually written in PHP as a web application
A web application (or web app) is application software that is created with web technologies and runs via a web browser. Web applications emerged during the late 1990s and allowed for the server to dynamically build a response to the request, ...
or a plugin for one of the popular applications such as WordPress
WordPress (WP, or WordPress.org) is a web content management system. It was originally created as a tool to publish blogs but has evolved to support publishing other web content, including more traditional websites, electronic mailing list, ma ...
. Such scripts avoid many issues with shortening services, keep the domain name as part of the shortened link, and can be made private.
See also
* Country code top-level domain
A country code top-level domain (ccTLD) is an Internet top-level domain generally used or reserved for a country, sovereign state, or dependent territory identified with a country code. All ASCII ccTLD identifiers are two letters long, and all tw ...
* Domain Name System
The Domain Name System (DNS) is a hierarchical and distributed name service that provides a naming system for computers, services, and other resources on the Internet or other Internet Protocol (IP) networks. It associates various information ...
* Emoji domain
* Generic top-level domain
Generic top-level domains (gTLDs) are one of the categories of top-level domains (TLDs) maintained by the Internet Assigned Numbers Authority (IANA) for use in the Domain Name System of the Internet. A top-level domain is the last level of ev ...
* Link rot
Link rot (also called link death, link breaking, or reference rot) is the phenomenon of hyperlinks tending over time to cease to point to their originally targeted file, web page, or server due to that resource being relocated to a new address ...
* List of Internet top-level domains
This list of Internet top-level domains (TLD) contains top-level domains, which are those domains in the DNS root zone of the Domain Name System of the Internet. A list of the top-level domains by the Internet Assigned Numbers Authority (IANA) ...
* Semantic URL
*
* Vanity domain
References
External links
Comparison of URL Shortening Services
SearchEngineLand. April 2009.
{{DEFAULTSORT:Url Shortening
URL
Internet terminology
URL-shortening services