One little enhancement I’ve made recently to my social media training and crisis communications platform, the Social Simulator, is a domain-specific URL shortener. The idea is, since we’re simulating Twitter and now Facebook in a private environment, we really ought to offer simulation participants the ability to post short, trackable URLs like they would on Twitter or Facebook in the wild. The platform’s secure and links are password-protected, but using public services like Bit.ly or Goo.gl feels wrong in this case.
I played around with Shorty, a nice-looking URL shortening tool, but one which had more complexity (logins, multiple tabs etc) than I needed or wanted. I wanted a specific kind of URL shortener, so thought I’d knock one up. A rare opportunity to build something from scratch.
Meet shURLy. She’s a simple girl, whose role in life is really just threefold:
- Take a long link, and shorten it nicely, using a short domain. 14.8m short URLs available.
- Restrict the URLs which can be shortened to a specific domain only e.g. mydomain.com or .uk sites
- Keep track of the number of clicks on that short link, and show the results when a ‘+’ is appended to the short link, à la Bit.ly
No logins, no APIs (for now), no QR codes, no social bookmarking.
I’ve got it running over on the Social Simulator platform, but I’ve made the code a bit more portable, and set up a little example at govuk.info – a special .gov.uk-only link shortener. Put in a URL to a .gov.uk page, and get a shortish URL out, like http://govuk.info/qwGK or http://govuk.info/B1kE.
Download & Technical Requirements
shURLy 0.1 is free and available under the open source GPL licence now (Zip archive, 33kb). Hosting your own shortener requires PHP, MySQL and a short domain you want to use. If you can set up things like WordPress, you should be up and running in a couple of minutes.
If you have any queries, suggestions or feedback, please leave a comment below, or drop me an email at the address above. Thanks!