6 June 2009 9:56p Pacific

URL shortener for ASP.net

by Matt Sherman

If you use Twitter, you are familiar with URL shortening services like bit.ly and tinyurl.com. They are useful for saving characters in the space-limited messages that Twitter allows.

However, in using them you lose control of your URL. End users don’t know what site they are going to before they click on it. Plus, your domain name is part of your brand – you want people to see it.

To remedy this, I’ve created a URL shortener for ASP.net web sites. The shortened URL retains your domain, while trimming it down as much as possible.

I am just testing it out on my site right now – you’ll see it in the upper right. Give it a try for me.

Once I’m assured it’s running reasonably well, I’ll share it!

--

Follow up: Flickr and Ars Technica are doing it too.

Comments

18 June 2009 3:42p Pacific #

Jason Bunting
I like this idea, very nice. Shortened URLs have been around before Twitter was popular, and I have used them on occasion (I like them for sending links to Google Maps locations, since those can be unwieldy). But they do present a few problems.

Your little control is very nice, have you given much thought to handling query string parameters or other such things? Eventually, if your site has enough pages shortened, you will simply end up with really long URLs regardless, especially if your website tries to keep things RESTful.

Of course, the only "problem" is that if someone simply has a long domain name, it will only help so much (like "codinghorror.com," that's just a lot longer than "tr.im").

Just as a contrived example, here is your shortened URL for this page, right below the shortened URLs from a few of the other shortening sites, including a custom one I made:

   http://tinyurl.com/ncxsvk
   http://tr.im/oZa9
   http://tr.im/aspshorts
   http://clipperhouse.com/-m

Notice which one is longest? Granted, you do lose out on knowing the *real* URL, but when people are using this for Twitter every character counts. Either way, I like the idea!

Jason Bunting United States |

18 June 2009 4:37p Pacific #

Matt Sherman
Hi Jason, nice comparison. It's a trade-off, you're right, limited by the length of one's domain.

One small redeeming thing -- since my URL shortener is limited to a small set of pages (mine), it requires fewer characters "after the slash". TinyURL uses 6, I use 2 in this case.

As far as querystrings and such, my shortener is agnostic. Just give it a URL and it gives you one back.

Matt Sherman United States |

3 August 2009 8:22a Pacific #

Justin Downing
Are you ready to share? I'd love to try it out..

Justin Downing United States |

Comments are closed

Tell others

TwitterTweet this page
Digg!Digg this page
TwitterAdd to Google Reader

Experimental! Let me know how it works for you.

Shorten this page's URL

Learn more about the TinyASP URL shortener

ASP.Net jQuery Controls

Implement jQuery effects using familiar ASP.Net server controls. Learn more...

Recent posts

How about jQuery-style “property methods” for C#?

A few more reasons to use Progressive Enhancement

Net neutrality and preserving the dinosaurs

IE8 becomes #1 browser, Chrome up, Firefox plateaus

more...  

About us

ClipperHouse.com is brought to you by Matt Sherman and Fernando Chilvarguer, among others. Contact us here.