请输入您要查询的百科知识:

 

词条 URL shortening
释义

  1. Purposes

  2. Registering a short URL

  3. Techniques

  4. Expiry and time-limited services

  5. History

  6. Advantages

  7. Shortcomings

     Abuse  Linkrot  Transnational law  Blocking and banning  Advertising  Privacy and security  Additional layer of complexity 

  8. Services

  9. See also

  10. References

  11. External links

{{pp-pc1}}{{Selfref|For information about human generated short URLs on Wikipedia, see WP and Manual:Short URL.}}{{refimprove|date=July 2014}}{{Use dmy dates|date=April 2013}}URL shortening is a technique on the World Wide Web in which a Uniform Resource Locator (URL) may be made substantially shorter and still direct to the required page. This is achieved by using a redirect which links to the web page that has a long URL. For example, the URL "{{mono|https://example.com/assets/category_B/subcategory_C/Foo/}}" can be shortened to "{{mono|https://snip.ml/Foo}}", and the URL "{{mono|https://example.com/about/index.html}}" can be shortened to "{{mono|https://snip.ml/h2iBY}}". Often the redirect domain name 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.[1]

Other uses of URL shortening are to "beautify" a link, track clicks, or disguise the underlying address. Although disguising of the underlying address may be desired for legitimate business or personal reasons, it is open to abuse.[2] Some URL shortening service providers have found themselves on spam blacklists, because of the use of their redirect services by sites trying to bypass those very same blacklists. 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 software or internet forums) or truncated.

On Twitter and some instant-messaging services, there is a limit to the number of characters a message can carry{{spaced endash}} 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 {{mono|goo.gl}}, {{mono|tinyurl.com}}, and {{mono|bit.ly}} 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 or on demand may require the use of an API.

A few well-known websites have set up their own URL shortening services for their own use{{spaced ndash}} for example, Twitter with t.co, Google with g.co, and GoDaddy with x.co.

Techniques

{{See also|URL redirection}}

In URL shortening, every long URL is associated with a unique key, which is the part after its top-level domain name. For example, {{mono|https://snip.ml/AgnH4}} has a key of {{mono|AgnH4}}. Not all redirection is treated equally; the redirection instruction sent to a browser can contain in its header the HTTP status 301 (permanent redirect), 302, or 307 (temporary redirect).

There are several techniques to implement a 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 {{mono|0, 1, 2, ..., 9, a, b, c, ..., y, z}}. 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 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, {{mono|https://example.com/product?ref=01652&type=shirt}} can be shortened to {{mono|https://snip.ml/example-shirt}}.

Not all protocols are capable of being shortened as of 2011, although protocols such as http, https, ftp, ftps, mailto, mms, rtmp, rtmpt, ed2k, pop, imap, nntp, news, ldap, gopher, dict and dns are being addressed by such services as URL Shortener. Typically, {{mono|data:}} and {{mono|javascript:}} URLs are not supported for security reasons (to combat attacks like XSS and Session Hijacking). Some URL shortening services support the forwarding of mailto URLs, as an alternative to address munging, to avoid unwanted harvest by web crawlers or bots. This may sometimes be done using short, CAPTCHA-protected URLs, but this is not common.[3]

Makers of URL shorteners usually register domain names with less popular or esoteric Top-level domains 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 domains of countries such as Libya (.ly), Samoa (.ws), Mongolia (.mn), Malaysia (.my) and Liechtenstein (.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 may become an issue for users and owners,[4] but this is not usually the case.

Services may record inbound statistics, which may be viewed publicly by others.[5]

Expiry and time-limited services

Many providers of shortened URLs claim that they will "never expire" (there is always the implied small print: so long as we do not decide to discontinue this service—there is no contract to be breached by a free service, regardless of "promises"—and remain in business).

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 URL shorteners offer a time-limited service, which will expire after a specified period. Services available include an ordinary, easy-to-say word as the URL with a lifetime from 5 minutes up to 24 hours, creation of a URL which will expire on a specified date or after a specified period, creation of a very-short-lived URL of only 5 characters for typing into a smartphone, restriction by the creator of the total number of uses of the URL, and password protection. A Microsoft Security Brief recommends the creation of short-lived URLs, but for reasons explicitly of security rather than convenience.[6]

History

An early reference is US Patent 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.[7]

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.[8] The first notable URL shortening service, TinyURL, was launched in 2002. Its popularity influenced the creation of at least 100 similar websites,[9] although most are simply domain alternatives. Initially Twitter automatically translated URLs longer than twenty-six characters using TinyURL, although it began using bit.ly instead in 2009[10] and later developed its own URL shortening service, t.co.

On 14 August 2009 WordPress announced the wp.me URL shortener for use when referring to any WordPress.com blog post.[11] In November 2009, shortened links on bit.ly were accessed 2.1 billion times.[12] Around that time, bit.ly and TinyURL were the most widely used URL-shortening services.[12]

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.[13] It resumed for a time,[14] 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 {{mono|http://to./xxxx}}, where {{mono|xxxx}} represents a sequence of random numbers and letters.[15]

On 14 December 2009 Google 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)[16] and extensions for Google Chrome.[17] On 21 December 2009, Google introduced a YouTube URL Shortener, youtu.be.[18] From September 2010 Google URL Shortener became available via a direct interface. The goo.gl service provides analytics details and a QR code generator.{{citation needed|date=February 2017}} On 30 March 2018 Google 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).[19]

Advantages

The main advantage of a short link is that it is, in fact, short, looks neat and clean and can be easily communicated and entered without error. To a very limited extent it may obscure the destination of the URL, though easily discoverable; this may be advantageous, disadvantageous, or irrelevant. A short link which expires, or can be terminated, has some security advantages.

Shortcomings

Short URLs often circumvent the intended use of top-level domains 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.[20]

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.[21]

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.[22]

A study in May 2012 showed that 61% of URL shorteners had shut down (614 of 1002).[23] 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 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.[12] In late 2009, the Internet Archive started the "301 Works" projects,[24] together with twenty collaborating companies (initially), whose short URLs will be preserved by the project.[12]

Transnational law

Shortened internet links typically use foreign country domain names, and are therefore under the jurisdiction of that nation. Libya, 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.[25]

Blocking and banning

Some websites prevent short, redirected URLs from being posted.

In April 2009, TinyURL was reported to be blocked in Saudi Arabia.[26] Yahoo! Answers blocks postings that contain TinyURLs,{{citation needed|date=October 2014}} and Wikipedia does not accept links by any URL shortening services in its articles.[27] The Reddit community strongly discourages{{spaced ndash}} and in some subreddits, outright bans{{spaced endash}} URL 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.[28]

Advertising

Sites such as Adf.ly use a number of advertising techniques, including interstitial advertising, to generate revenue. This may deter readers.

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 blacklisted URLs to be accessed, bypassing site blocks; this facilitates redirection of a user to blacklisted scam pages or pages containing malware or XSS attacks. TinyURL tries to disable spam-related links from redirecting.[29] ZoneAlarm, 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.[30] A destination preview may also be obtained by prefixing the word "preview" to the TinyURL URL; for example, the destination of {{mono|https://tinyurl.com/8kmfp}} is revealed by entering {{mono|https://preview.tinyurl.com/8kmfp}}. Other URL shortening services provide a similar destination display.[31] Security professionals suggest that users check a short URL's destination before accessing it,{{citation needed|date=February 2017}} following an instance where the shortening service cli.gs was compromised, exposing millions of users to security uncertainties.[32] There are several web applications that can display the destination URL of a shortened URL.{{citation needed|date=February 2017}}

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 blacklists.

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."[33][34]

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.{{Original research inline|date=November 2010}}

Services

Site Company Type Custom URL Comment
bit.ly Bitly general public yes
goo.gl Google general public n.a. replaced by FDL
t.co Twitter internal n.a.
TinyURL TinyURL general public yes
youtu.be YouTube (Google) internal n.a.
ow.lyHootsuite Mediageneral publicyes

Open source and commercial scripts are also available for redirecting and shortening links, usually written in PHP as a web application or a plugin for one of the popular applications such as Wordpress. 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
  • Domain name system
  • Generic top-level domain
  • Link rot
  • List of Internet top-level domains
  • Semantic URL
  • Vanity domain

References

1. ^Goo.gl Challenges Bit.ly as King of the Short – New York Times, 14 December 2009
2. ^{{cite web|last1=Curtis|first1=Sophie|title=Twitter's t.co URL shortener used to spread spam|url=https://www.telegraph.co.uk/technology/internet-security/11020760/Twitters-t.co-URL-shortener-used-to-spread-spam.html|website=The Telegraph|publisher=Telegraph Media Group|accessdate=15 March 2015|date=8 August 2014}}
3. ^{{cite web|url=http://www.certmag.com/read.php?in=3863|title=Spammers Storm URL Shortening Services|publisher=CertMag|date=17 August 2009}}
4. ^{{cite web|author=http://hootsuite.com |url=http://blog.hootsuite.com/li-ly-url-shortener/ |title=#HootSuite Offers Choice of URL Shorteners ~ From Libya to Liechtenstein – HootSuite Social Media Management|publisher=Blog.hootsuite.com |date= |accessdate=20 April 2013}}
5. ^{{cite news|last=Chapman|first=Stephen|title=How to spy on campaigns of competitors who use URL shorteners|url=http://www.zdnet.com/how-to-spy-on-campaigns-of-competitors-who-use-url-shorteners-7000001088/|accessdate=10 September 2012|newspaper=ZDNet|date=28 August 2012}}
6. ^{{cite web | url=http://msdn.microsoft.com/en-us/magazine/dd458793.aspx | title=Protect Your Site With URL Rewriting - A Stateless Approach: Automatically Expiring URLs| publisher=Microsoft MSDN Magazine | work=Security Briefs | date=March 2009 | accessdate=1 August 2013 | author=Sullivan, Bryan}}
7. ^{{US patent reference | number = 6957224 | y = 2005 | m = 10 | d = 18 | inventor = Nimrod Megiddo and Kevin S. McCurley; assigned to IBM corp. | title = Efficient retrieval of uniform resource locators}}
8. ^"Comment thread 8916". Metafilter. 10 June 2001; Announcement of URL shortening service available at makeashorterlink.com
9. ^"URL Shortening Services" shortenurl – Supported URL shortening services
10. ^Wortham, Jenna (7 May 2009) "Bit.ly Eclipses TinyURL on Twitter" Bits (blog at The New York Times). Retrieved 1 January 2011.
11. ^"WP.me — Shorten Your Links" WordPress. 14 August 2009.
12. ^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. Retrieved 1 January 2011.
13. ^[https://web.archive.org/web/20090810234517/http://blog.tr.im/post/159369789/tr-im-r-i-p tr.im R.I.P.] blog.tr.im
14. ^[https://web.archive.org/web/20090813014303/http://blog.tr.im/post/160697842/tr-im-resurrected tr.im Resurrected]. blog.tr.im
15. ^{{cite web |last=Michlick |first=Frank |url=http://www.domainnamenews.com/cctlds/worlds-shortest-url-shortener/6741 |title=.TO ccTLD Becomes Worlds Shortest URL Shortener |publisher=Domainnamenews.com |date= |accessdate=20 April 2013 |deadurl=yes |archiveurl=https://web.archive.org/web/20130503173537/http://www.domainnamenews.com/cctlds/worlds-shortest-url-shortener/6741 |archivedate=3 May 2013 |df=dmy-all }}
16. ^{{cite web|last=Muthusrinivasan |first=Muthu |url=http://googleblog.blogspot.com/2009/12/making-urls-shorter-for-google-toolbar.html |title=Making URLs Shorter for Google Toolbar and FeedBurner |publisher=Googleblog.blogspot.com |date=14 December 2009 |accessdate=20 April 2013}}
17. ^{{cite web|url=https://chrome.google.com/extensions/detail/iblijlcdoidgdpfknkckljiocdbnlagk |title=goo.gl "URL Shortener — Google Chrome Extension Gallery" |publisher=Chrome.google.com |date= |accessdate=20 April 2013}}
18. ^{{cite web|url=http://youtube-global.blogspot.com/2009/12/make-way-for-youtube-links.html|title=Official YouTube Blog: Make Way for youtu.be Links|work=Official YouTube Blog}}
19. ^{{cite web|last1=Hermanto|first1=Michael|title=Transitioning Google URL Shortener to Firebase Dynamic Links|url=https://developers.googleblog.com/2018/03/transitioning-google-url-shortener.html|website=Google Developers|publisher=Google|accessdate=1 April 2018}}
20. ^{{cite web|url=http://www.tonic.to/faq.htm |title=Tonic Corporation Frequently asked questions |publisher=Tonic.to |date= |accessdate=20 April 2013}}
21. ^http://u.nu/unu-discontinued "u.nu :: discontinued."
22. ^{{cite web|url=https://groups.google.com/forum/?fromgroups#!topic/google-url-shortener/pemNrYhHZz8 |title=Google Discussiegroepen |publisher=Groups.google.com |date= |accessdate=20 April 2013}}
23. ^{{cite web |url=http://yi.tl/pages/urlshorteners.php |title=Ultimate list of URL shorteners |publisher=Yi.tl |date=23 May 2012 |accessdate=20 April 2013 |archiveurl=https://archive.is/20130418171155/http://yi.tl/pages/urlshorteners.php |archivedate=18 April 2013 |deadurl=yes |df=dmy-all }}
24. ^{{cite web|url=https://archive.org/details/301works|title=301Works.org : Free Software : Download & Streaming : Internet Archive|work=archive.org}}
25. ^{{cite news |author=Staff writer|date=14 October 2010|title=Law, Politics and Internet Addresses — Tough.ly/Treated — Shortened Web Links Are Convenient, But They Come at a Price|work=The Economist |url=http://www.economist.com/node/17249654|accessdate=1 January 2010}}
26. ^{{cite web |url=http://committeetoprotectbloggers.org/2009/04/16/tinyurl-blocked-in-saudi-arabia/ |title=TinyURL Blocked in Saudi Arabia |date=16 April 2009 |publisher=Committee to Protect Bloggers}}
27. ^{{cite web|url = https://meta.wikimedia.org/wiki/Spam_blacklist |title = Spam blacklist |work = meta.wikimedia.org |publisher = Meta, discussion about Wikimedia projects |accessdate=4 November 2016}}
28. ^{{cite web|url=https://www.reddit.com/wiki/reddiquette|title=Rediquette|accessdate=9 February 2017}}
29. ^Krebs, Brian (13 June 2006). "Spam Spotted Using TinyURL". Security Fixes (blog at The Washington Post). Retrieved 1 January 2011.
30. ^{{cite web|url=http://tinyurl.com/preview.php |title=Preview a TinyURL |publisher=Tinyurl.com |date= |accessdate=20 April 2013}}
31. ^{{cite web|url=http://security.thejoshmeister.com/2009/04/how-to-preview-shortened-urls-tinyurl.html |title=the JoshMeister on Security: How to Preview Shortened URLs (TinyURL, bit.ly, is.gd, and more) |publisher=Security.thejoshmeister.com |date=11 April 2009 |accessdate=20 April 2013}}
32. ^[https://web.archive.org/web/20090628221947/http://blog.cli.gs/news/cligs-got-hacked-restoration-from-backup-started "Updated: Cligs Got Hacked — Restoration from Backup Started"] Blog at Cli.gs (16 June 2009).
33. ^[https://freedom-to-tinker.com/blog/vitaly/gone-in-six-characters-short-urls-considered-harmful-for-cloud-services/ Shmatikov, Vitaly, "Gone In Six Characters: Short URLs Considered Harmful for Cloud Services." Blog entry dated April 14, 2016; retrieved April 26, 2016.]
34. ^[https://arxiv.org/abs/1604.02734v1 Georgiev, Martin and Vitaly Shmatikov, "Gone In Six Characters: Short URLs Considered Harmful for Cloud Services." arXiv:1604.02734v1]

External links

  • {{Dmoz|Computers/Internet/Web_Design_and_Development/Hosted_Components_and_Services/Redirects/|URL redirection and shortening}}
  • Comparison of URL Shortening Services, SearchEngineLand. April 2009.

{{DEFAULTSORT:Url Shortening}}

3 : URL|Internet terminology|URL-shortening services

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/23 12:22:29