Questions tagged [url-shortener]

URL shortening is a technique in which a URL may be made substantially shorter in length and still direct to the required page.

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 especially convenient for messaging technologies such as Twitter and Identi.ca, which severely limit the number of characters that may be used in a message.

407 questions
118
votes
4 answers

How do short URLs services work?

How do services like TinyURL or Metamark work? Do they simply associate the tiny URL key with a [virtual?] web page which merely provide an "HTTP redirect" to the original URL? or is there more "magic" to it ? [original wording] I often use URL…
Nathan Campos
  • 28,769
  • 59
  • 194
  • 300
112
votes
3 answers

How does a URL Shortener work?

I wonder how a URL Shortener works, like how they extract the text from address bar and map it to correct URL, later redirect it. What programming language do they use? How do they maintain the history of the mapping? How do they ensure the…
prap19
  • 1,818
  • 3
  • 16
  • 26
72
votes
9 answers

YouTube-like GUID

Is it possible to generate short GUID like in YouTube (N7Et6c9nL9w)? How can it be done? I want to use it in web app.
kusanagi
  • 14,296
  • 20
  • 86
  • 111
37
votes
4 answers

Shortening/Rehashing UUIDs

first of all, I want to assure that I'm aware of the fact, that rehashing is a sensible topic. However I'd like to hear some of your opinions, what approach you would take here. I'm building a distributed application, where nodes remotely create…
b_erb
  • 20,932
  • 8
  • 55
  • 64
32
votes
7 answers

Find where a t.co link goes to

Given a "t.co" link, how can I find out what the link resolves to? For example, if I have "t.co/foo", I want a function or process that returns "domain.com/bar".
hookedonwinter
  • 12,436
  • 19
  • 61
  • 74
27
votes
5 answers

Cloud Functions for Firebase: 'Error: could not handle the request'

I feel like pulling my hair out; this is either super simple and i'm having brain freeze or it is not that simple. What I want I am trying to unshorten a shortened URL using firebase, when a user goes…
21
votes
2 answers

URL shortening algorithm

Now, this is not strictly about URL shortening, but my purpose is such anyway, so let's view it like that. Of course the steps to URL shortening are: Take the full URL Generate a unique short string to be the key for the URL Store the URL and the…
Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140
21
votes
10 answers

How can I unshorten a URL?

I want to be able to take a shortened or non-shortened URL and return its un-shortened form. How can I make a python program to do this? Additional Clarification: Case 1: shortened --> unshortened Case 2: unshortened --> unshortened e.g.…
Andrew
  • 3,901
  • 15
  • 50
  • 64
21
votes
1 answer

301 redirect vs 307 redirect

I am wondering about the difference between 301 and 307 redirects. I am looking to generate backlinks through a home-brew url redirector, and I wish for any of the "link juice" or "page rank juice" to flow directly from the originating back page…
21
votes
7 answers

How do I reverse a t.co URL to the originating Tweet?

I'm going through our site analytics, and have a load of t.co URLs which were referrers to a promotion we were doing. I'm trying to figure out if there is a way to reverse those back to the original tweet where they originated, through the Twitter…
Greg Hinch
  • 807
  • 2
  • 8
  • 23
18
votes
6 answers

jQuery on the fly URL shortener

I'm looking for an on the fly URL shortener much like how tweetdeck works. I have found many jQuery and general javascript plugins that take a url and run it through a shortening service such as bit.ly when a button is pressed. However, I have not…
Jason
  • 17,276
  • 23
  • 73
  • 114
18
votes
1 answer

How do URL shorteners guarantee unique URLs when they don't expire?

There are a lot of questions here on stackoverflow regarding URL shorteners as well as elsewhere on the internet, e.g. How to code a URL shortener? How do URL shortener calculate the URL key? How do they…
Pieter
  • 3,339
  • 5
  • 30
  • 63
17
votes
3 answers

Could not load file or assembly System.Threading.Tasks, Version=2.5.19.0

I have a WPF (.NET 4) project using google url shortener API, I have installed the client library through nugget https://www.nuget.org/packages/Google.Apis.Urlshortener.v1/1.7.0.25-beta the application works fine in visual studio but once published…
Syed Waqas
  • 862
  • 2
  • 9
  • 29
16
votes
3 answers

Using Only Javascript To Shrink URLs Using The Bit.ly API

I'm playing a bit with Javascript these days... I was shrinking some URLs using bit.ly to tweet them, then I started to think on a automated process that could use their API to shrink the URLs I wanted, then I looked up on their documentation, and I…
Nathan Campos
  • 28,769
  • 59
  • 194
  • 300
15
votes
2 answers

Is there a URL shortener that works with really long data URIs?

I have an app that generates web-pages as data URIs. These data URIs can be really long. I have a page that has a Data URI that is 103,828 characters long, for instance. Everything about the app works and it's no problem, it's just slightly painful…
sanjayb
  • 176
  • 1
  • 6
1
2 3
27 28