When Short Url Services Die – Protect Yourself
The tr.im url shortening service announced that it may be going out of business. This was a big shock to people who use the service. It means that all tr.im urls could be dead after December 2009. Broken links represent more than lost information, they can result in lost business, and so it’s important to think of contingency plans when it comes to your use of short urls.
While I recommend that each business setup its own url shortening service, there is a quick way to place a buffer between the links that you share and the shortening service that you use; create a short url translator.
A short url translator is a small file on your site that looks like a shortening service. Instead of keeping track of shortened urls, however, it simply redirects requests for links to the url shortening service of your choice. You don’t share links directly from your url shortening service, you share links that pass through your translator. These links won’t be as short as the links from your short url service, but sometimes shorter is good enough.
For example, let’s say you have a long url:
http://mydomain.com/marketing/brochure/thisisthebestbrochure.htm
Typically, you would shorten the link above on tinyurl.com to something like this:
http://tinyurl.com/8dn35
With the translator, rather than sending your customers the tiny url, you send them this link:
http://short.mydomain.com/8dn35
When your customer clicks on the link (http://short.mydomain.com/8dn35) your site will translate that link to http://tinyurl.com/8dn35 and they’ll be redirected to your brochure as if they had used the tiny url directly.
Now, the protection lies in your ability to control the destination for the original link. If tiny url is no longer available (God forbid), your clients would be stuck with a dead link. However, because you sent out this link http://short.mydomain.com/8dn35, you can do some additional programming on your site to redirect the link to the correct page.
This solution assumes that tiny url will continue to be fine and that you’ll only have to make any changes in an emergency. If you still have big concerns, then I really suggest you write your own service so that you control the entire process.
I’ve included the code below for a short url translator. Give it a try. I’d love to hear your suggestions and concerns.
<?php
/*
* @package ShortUrl Translator
* @author Shannon Whitley
* @copyright Whitley Media
* @license GNU/GPL Version 2
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2 of the License.
*/
/********************************************************************************
Usage: Use the code from a short url service as the
last parameter when calling this page.
Example:
http://{your website}/shorturl.php/unicycles will redirect
to http://tinyurl.com/unicycles
You can add a subdomain and implement url rewriting to create this:
http://short.{your website}/unicycles
********************************************************************************/
$shorturl = '';
$shortcode = '';
/********************************************************************************
** Insert your favorite short url service.
** The format is assumed to be: http://{short url svc}/{code}
********************************************************************************/
$shorturlsvc = 'http://tinyurl.com/';
/********************************************************************************/
$urlParts = explode('/', $_SERVER["PHP_SELF"] );
//Example: http://{your website}/shorturl.php/unicycles
if(count($urlParts) == 3)
{
$shortcode = $urlParts[2];
}
//Redirect to the short url service.
if(strlen($shortcode) > 0)
{
$shorturl = $shorturlsvc . $shortcode;
header( 'Location: ' . $shorturl );
}
else
{
header( 'Location: /');
}
?>
data-text=”When Short Url Services Die – Protect Yourself (Shannon Whitley)”
data-count=”vertical”
>Tweet
3 Responses to “When Short Url Services Die – Protect Yourself”
Leave a Reply
13 Trackbacks
- prnewswire (PR Newswire)
RT @swhitley: “When Short Url Services Die – Protect Yourself” – [link to post] - ciafolla (Chris Iafolla)
RT @kbodnar32: RT @swhitley: “When Short Url Services Die – Protect Yourself” – [link to post] - swhitley (Shannon Whitley)
“When Short Url Services Die – Protect Yourself” – [link to post] - prnewswire (PR Newswire)
@swhitley Very interesting concept, but with the translator, can’t u just skip the shortening service all together? Or did I misunderstand? - ericunold (Eric Unold)
@swhitley thanks and cool. do you have to manually append the shortener uri e.g. ’8dn35′ when sending links? - swhitley (Shannon Whitley)
@ericunold I’m sure someone could write a simple bookmarklet to handle the entire process. It’s manual right now. - swhitley (Shannon Whitley)
@PRNewswire The translator doesn’t maintain a database of short to long link conversions. You still rely on the short service for that. - prnewswire (PR Newswire)
@swhitley ah yes- so a way to redirect if your shortening service goes away. Thanks for sharing the code! - swhitley (Shannon Whitley)
@PRNewswire You’re welcome. - eva_smith (Eva Smith)
eva_smith: RT “When Short Url Services Die – Protect Yourself”: [link to post] via @swhitley - URL Shortener – What / Why / How?
[...] the company providing your short URLs goes bust none of your shortened links will work (e.g. tr.im When Short Url Services Die) This entry was posted in Twitter and tagged Social Media, Twitter, URL Shortener. Bookmark the [...]
- SteveKayser (Steve Kayser)
When Short Url Services Die – Protect Yourself | RT@SWhitley [link to post] – thanks Shannon - Jeffhurt (Jeff Hurt)
@SteveKayser So you’re updating the blog, eh? Great. Always like reading your posts although some are small novels.

Twitter Comment
RT @swhitley: “When Short Url Services Die – Protect Yourself” – [link to post]
– Posted using Chat Catcher
Twitter Comment
RT @kbodnar32: RT @swhitley: “When Short Url Services Die – Protect Yourself” – [link to post]
– Posted using Chat Catcher
Twitter Comment
“When Short Url Services Die – Protect Yourself” – [link to post]
– Posted using Chat Catcher
Twitter Comment
@swhitley Very interesting concept, but with the translator, can’t u just skip the shortening service all together? Or did I misunderstand?
– Posted using Chat Catcher
Twitter Comment
@PRNewswire The translator doesn’t maintain a database of short to long link conversions. You still rely on the short service for that.
– Posted using Chat Catcher
Twitter Comment
@swhitley ah yes- so a way to redirect if your shortening service goes away. Thanks for sharing the code!
– Posted using Chat Catcher
Twitter Comment
@PRNewswire You’re welcome.
– Posted using Chat Catcher
Twitter Comment
@swhitley thanks and cool. do you have to manually append the shortener uri e.g. ’8dn35′ when sending links?
– Posted using Chat Catcher
Twitter Comment
@ericunold I’m sure someone could write a simple bookmarklet to handle the entire process. It’s manual right now.
– Posted using Chat Catcher
Why do you need tinyurl at all in this case? Why wouldn’t you just redirect http://short.mydomain.com/8dn35 to http://mydomain.com/marketing/brochure/thisisthebestbrochure.htm ?
Or you simple role your own urlshortener.
Don’t really understand why you first should shorten your url then redirect to that url using an shortened url on your site. Why not just skip the tinyurl all together?
and have http://short.domain.com/1
Its little more code but really not that complicated.
Twitter Comment
eva_smith: RT “When Short Url Services Die – Protect Yourself”: [link to post] via @swhitley
– Posted using Chat Catcher
@Andreas Nurbo
I agree, but there are many instances where a small step is better than none at all. If you are a medium-sized business, for example, you many not have time to devote (however few hours it may be) to a full url shortener, and you may have too many people to simply create a translation list. This solution gives you a quick way to use what’s already been built, but to have a safety valve just in case.
[...] the company providing your short URLs goes bust none of your shortened links will work (e.g. tr.im When Short Url Services Die) This entry was posted in Twitter and tagged Social Media, Twitter, URL Shortener. Bookmark the [...]
Twitter Comment
When Short Url Services Die – Protect Yourself | RT@SWhitley [link to post] – thanks Shannon
– Posted using Chat Catcher
Twitter Comment
@SteveKayser So you’re updating the blog, eh? Great. Always like reading your posts although some are small novels.
– Posted using Chat Catcher