Do url shortening services shorten the id or directly the url?

Posted by Tatu Meriläinen on Pro Webmasters See other posts from Pro Webmasters or by Tatu Meriläinen
Published on 2012-04-11T11:03:08Z Indexed on 2012/04/11 17:42 UTC
Read the original article Hit count: 401

Filed under:
|

Assuming the urls are saved to a database where they each have id and the url saved. For example a url www.example.com (let's say with id 1000) would possibly be shortened to www.url.com/c1hd5 etc.

Is the url www.example.com shortened to c1hd5 with base64 or similar or are the ids shortened?

The 566 id could be shortened like this: 1 = 1, 2 = 2, ... 9 = 9, 10 = a. The 1000 id would be fE if we used every possible letter from a-Z and - _.

Is it good idea to use ids from database to shorten urls?

© Pro Webmasters or respective owner

Related posts about url

Related posts about url-shorteners