A successful DIY musician (I’m told) isn’t easily distracted.  By contrast, a DIY musician – note missing adjective – chases all manner of butterflies down all manner of rabbit-shaped holes.  As evidence, I spent yet another weekend building something arguably fabulous, though it bears no resemblance to music or anything musical.  It’s a URL shortener.  “Tada!”

URL shorteners, also known as link shorteners – they’re those nifty tools that turn your ungainly webpage addresses (e.g., https://mywebsite/myselfglorifyingblog/myselfindulgentpost/) into slightly less-ungainly webpage addresses (e.g., http://bit.ly/wtf) – are freely available everywhere.  And they do a fine job of squishing your links into space-constrained tweets and auto-uncorrected text messages.  So, why build my own?  Here’s my rationale (along with some counter-rationale, just to confuse you):

Things Go Boom

In little over a decade, many link-shortening services have come and gone.

Should you care?  Well, if your short links resolve to a transitory marketing campaign, then you probably won’t notice when those links fizzle.  On the other hand, if your short links appear in popular music webzines, blogs, and Internet discussion forums, and they continue to refer valuable visitors to your website, then such an interruption could be (will be, according to Murphy, Diodurus, etc.) catastrophic.

By now, I’ve used several link shortening services but didn’t fully embrace them until I discovered UTM (Urchin Tracking Module) parameters.  What are UTM parameters, you ask?  [You probably didn’t.]  When added to a URL, these variables provide valuable performance tracking data to your website’s analytics, revealing which emails, social posts, and ads connect with your fans – or, if you’re OCD, which individual words (e.g., profanity), hashtags (e.g., #profanity), and images (e.g., pornography) resonate.  On the downside, by the time you append all of these parameters and values to your URLs, they become unimaginably long.  I won’t provide an example here because it would word-wrap five times and likely throw off my gorgeous page formatting.  Suffice it to say, a link shortener is mandatory when sharing UTM-encoded URLs.

When Google’s link shortener (goo.gl) was retired by the tech giant, it caught me by surprise.  I grudgingly moved to Found.ee, a link shortener developed specifically for the music industry.  But then, Found.ee was acquired and, soon after, their link shortening service was commoded…  er, commoditized.  Great.  Clearly, free third-party link shorteners aren’t reliable for the long term.

Humans Are Unreliable

Especially this human.  Remember those UTM parameters I mentioned?  If you don’t manage your UTM parameter values carefully, you can make a real mess of things.  And by you, I mean me.

To reduce human error and maintain consistency, I designed a link shortener that doubles as a UTM data manager, accepting standard UTM parameter values via optional form fields.  Then, it automatically generates the fully-qualified URL before shortening it.  This saves a bit of manual effort and reduces typos.  More importantly, when I submit UTM parameter values, I’m reminded of prior values so consistency is maintained within marketing campaigns.  Without regular such hints, I’m likely to call the same marketing campaign “album_release,” “album-release,” and “Album-Release,” which Google Analytics will present as three separate campaigns.  After all that effort, it’ll be difficult to determine which promotional activities worked and which didn’t.

Prior to this, I was managing UTM parameter values manually in an Excel spreadsheet – a huge time suck that didn’t always protect me from myself.  Errors were made.  Time was wasted.  Lives were lost.

How not to manage your UTM parameter values - in a spreadsheet.

Mending the Unmendable

Earlier, I touched on an important, if seldom appreciated, side-benefit of short links:  They can protect your traffic from all sorts of online catastrophes.

For example, let’s assume your favorite music streaming service goes out of business.  Every link to that service you’ve ever published or emailed is immediately dysfunctional, right?  Not if those links are short links.  One quick edit to your short link can effectively update thousands of link impressions, instantly forwarding visitors to another streaming service or to a dedicated help page on your website.

The same holds true for cloud storage services where you probably keep your music downloads and other shared files for press contacts, music supervisors, and other VIPs.  [Agitating these folks should be low on your to-do list.]  With short links, you can move your files from one cloud storage service to another and never create a problem for your users.

And, what about all those inbound links to your website?  Website updates are inevitable and can orphan your inbound links.  A server-side redirect (a.k.a., forwarder) is the preferred remedy for “404 – Page Not Found” errors, but not every host permits such low-level noodling.  Nor does everyone have the scripting chops necessary to craft them.  [Regular Expression syntax is and shall forever be Satan’s greatest curse on humanity.]  Alternately, if you can find all those inbound links, you might login to each service and edit your forum signatures, for example, but that’s crazy tedious.  And, of course, links from webzine reviews and music blog interviews aren’t yours to edit in the first place, so forget it.  But again, if those links are short links, you can redirect visitors to new addresses without anyone ever knowing.

That’s a powerful argument for short links in general.  So powerful, in fact, that it begs the question:  Can you afford to entrust your short links to a third-party provider that will almost certainly evaporate at some point in the future?

Tracking the Untrackable

Of course, inbound links to your website can be tracked through Google Analytics or any number of website log analyzers.  But what about links that direct users to Spotify, Bandcamp, your Amazon store, or other third-party destinations?  When those links appear in social posts, on Internet discussion forums, and in emails, for example, there’s no way to know when or how many times those links are clicked – unless those links are short links.  Again, “Tada!”

No, you don’t need to build your own link shortener to realize this benefit – most services offer a no-frills report of click counts.  But, if you want more detail – where those users are located, unique visitors vs. repeat visitors, performance over time, etc. – you’ll need to build your own or, probably, upgrade to a premium plan of some sort.  If it’s available.

Advanced tracking can also detect and eliminate false positives (e.g., “bots”) from your click counts.  Twitter, for example, generates a dozen bogus “visits” to your link destinations, each and every time you embed them in your tweets.  Other social networks do the same, at a minimum, to scrub the link destination for image thumbnails and preview text, and perhaps to inspect content for policy violations.  But, a dozen visits?!  This can throw your click counts off by a large margin and generate a false sense of confidence.

One Is Never Enough

A custom link shortener will require a custom domain name.  But why stop at one?  If your link shortener is built to support multiple domain names – I’ll get to this in a moment – you can expand at will, offer the service to your friends, and maybe launch a side business that will distract you from your musical ambitions forever.  Weee!!!

Ouroboros and the Inevitable Short Link Singularity

Once you have a short link, what’s to stop you (or anyone else) from plugging it into another link shortener?  Nothing.  But know this:  When you do, the mythological snake will eat our mythological tails and the universe will collapse in on itself, leaving only a hole in the nothing.  Fact.

And, unfortunately, this dire fate is inevitable.  Like it or not, your short links will be re-shortened by some third parties that mandate their own link shorteners.  Twitter, for example, converts all links to its branded “t.co” short links, whether those links were already shortened or not, and – get this – even if the resulting “short” link is longer than the original.  Likewise, many social media marketing services, like Zoho Social, impose their own short links – in their case, “zurl.co.”

By encapsulating your short link inside of their own, these services effectively steal back control of the conversation, for better and for worse.  On the better side, Zoho Social employs its short links to monitor social activities across myriad networks and integrates those conversations with your contact manager – a valuable tool.  On the worse side, Twitter uses this control to block links to sites it deems “dangerous.”  That’s usually a good thing.  Until it isn’t.  Never mind the politics – I don’t care who you voted for (or against) – when robots (or robotic people) are trusted to weed the good from the bad, your links are in jeopardy.  Then again, Twitter’s short links are likely to last as long as Twitter does while Zoho’s may vanish when you cease to be their customer.

So, if higher powers are going to shorten your links forcibly, why bother creating your own short links?  My advice is this:  If you plan to run all of your marketing operations through a unified service, like Zoho Social or Salesforce, you can save yourself a lot of effort by leaving the short links to them.  And this is doubly true if your marketing campaigns are generally brief and the longevity of your short links isn’t important.  “Let go, Luke.”

For everyone else, a more hands-on approach is recommended.  Personally, I do a bit of both.  I run all shared links through my own shortener first, just to guarantee I can edit them later.  Then, I’ll use the Zoho One suite for transient social posts and email campaigns, understanding that my links will be re-shortened, Ouroboros-style, and that those links will eventually die.  On the other hand, where shared links are critical and should never expire, I’ll forego the conveniences of Zoho.  Yeah, it’s a juggle, but I’m used to it by now.  Mostly.

Workarounds

Okay, so you’re unwilling to build your own link shortener?  There are ways to get many of the aforementioned benefits without necessarily rolling your own.

As mentioned previously, some third-party link-shortening services permit custom domain names.  This feature is usually part of a “pro” plan, and you’ll have to purchase and manage the domain name yourself.  On the bright side, locating a relevant domain name that isn’t already registered isn’t as difficult as you might expect.  Short country code top-level domains, like .CC and .LY, have been largely ignored by cybersquatters.  And, by the time you remove the vowels from your name to create an ultra-short domain, you’ll likely have something nobody else wants anyways.  For example, I settled on two domains – one for my record label, Resort Records (rsrt.cc), and one for my artist website (delb.cc).  I was hoping to find res.rt and del.br, but wasn’t so lucky.  But that’s just me.  There are hundreds of CC TLDs that might suit your name ideally.

Once again, with a custom domain name, you’ll be able to port your critical short links to a new service, should things fall apart where you are.

How to Build Your Own Link Shortener (Abridged)

A complete dissection of database tables and code is beyond the scope of this blog.  But here’s an overview of my steps, to help you get started.

I built the interactive webpages with Adobe’s ColdFusion.  For reference, Ben Nadel offers an extraordinary primer that is sufficient for single-domain solutions.  In particular, his two “base_n” functions make quick work of churning out unique short links from a given set of alphanumeric characters – I used both without modification and was spared hours of wheel re-invention.  [Thank you, Ben!]  To support multiple domains, you’ll need to modify the database tables to incorporate the domain names (or, more efficiently, their unique IDs) into the table’s keys – for what we call a multi-column primary key.  This will allow your database lookups to identify duplicates and to produce unique short links per domain.

On the back end, I used Microsoft’s SQL Server.  Here, be sure to enable case sensitivity for the table that holds your short URLs.  This simply means changing the appropriate field’s collation parameter value from “<database default>” to “SQL_Latin1_General_CP1_CS_AS,” where “CS” means “case sensitive.”  If you don’t do this, your short URLs will end up being entirely uppercase.  And if you’re working from Ben’s aforementioned samples, you might also want to create additional tables for tracking clicks, datestamps, and IP addresses.  For each short link, I also added fields for Description and Link.  These optional fields describe the purpose of the short link and supply a direct link to its use in the wild, respectively.  The latter is super-useful for revisiting posts buried in Facebook groups, for example, without all the annoying logins and searching.  And you can easily share those links with colleagues to boost activity and bump your exposure.  [When appropriate, of course.]

The management interface, with UTM parameter value tracking, etc. – see slideshow, above – I built from scratch, being that I’d never seen anything like it before and knew exactly what I wanted.  For this, I created six additional database tables – one for each of the five standardized UTM parameters and another to hold the combinations of parameter values when attached to a destination URL.  With a complete record of every UTM string ever used, it’s a simple matter to lookup and present suggestions that are relevant to the user’s input.  If AJAX isn’t your strongest suit, you can also skip this step and rely solely on your browser’s auto-complete function.  Form field suggestions won’t be contextual and the lists will eventually get long, but it will do most of the work for you until you outgrow it.  I particularly like that Firefox performs substring matches when suggesting form field values from historical input.  This way, I can type the title of a single (e.g., “Abiogenesis”) into the Description field and see every prior Description that contains the word – not just those that begin with it.  Usually, I can reuse a historical value with minor changes.  Or, I might realize from the suggestions that I’ve already created the desired short link and shouldn’t duplicate it.  Likewise, I created my own open-ended search function that searches all fields for any given substring.  It’s ideal for listing all of the short links created for a particular destination page or marketing campaign, for example, and does a good job of preventing unwanted duplication.

Conclusions

Building your own link shortener – or, at least, owning your own shortlink domain – has some clear advantages.  I highly recommend it, and not just because your custom short links will be shorter than everyone else’s and match your brand.  [Very cool, in a ‘geek chic’ sorta way, even if your Goth friends won’t admit it.]  More important are the marketing considerations, if I can say that without murdering my artistic credibility.

Either way, this was fun, but these side projects are killing my career.  I need to get back in the studio and make some music.

You should too.