Rolling Your Own ShortURL Service

Today we are announcing the ShortURL service, this is the first product or service that 2FatDads has ever launched. And it is very much in pre-beta form right now. In fact this post should be the first link to actually use the service itself, and the only people who will have access to it for the time being are the Fat Dads. If it goes well, we will make it available to all of our readers and listeners.

Original photo by Flckr’s sludgeulper

Why are we doing this? We’re not trying to create a “me too” service or even claim any ownership of anyone else’s content. We always give full credit to any source we use and use full links to the original source in our all our posts as well, always striving to avoid any kind of link digging on your behalf.  We read the best wordpress hosting review then decided to use open source technologies like, PHP, MySQL to build the site and try to publish it with other standards compliant protocols like RSS and the media enclosures that allow us to send the DadCasts into  iTunes. Over the years we have bolted on neat-o plug-ins to either modify the format of the site or allow us to use our arsenal of Google Tools like Analytics for web stats and Adsense for serving up the Ads you might see to the left and at the bottom of some of our posts, well that is if you are not if you’re not blocking ads with a browser extension (more on that another time).

All we want to do is make sure our posts and interesting links get to you faster. If we post a new article before lunch, you can bet that we want it to be tweeted twittered in front of your eyes at the same time. And because we’re busy Fat Dads with a bit of a programming background, we HAVE to find some kind of automated service to do this for us. In the beginning we were using some pretty cool services that would use popular shortURL services. But this opened up a few problems along the way, let me explain what the issues are and why you should actually care about this too.

You see the big issue boils down to one of content ownership. Who’s content is it anyway? If you re-blog or re-tweet it, is it yours now? I can already hear you saying: Of Course Not. But what if you added a few words to it, like say a punch line. And you then redirected the reader to your own site where you’ve copied a large part of the original text, let’s say the crux of the story and then hidden a link to the original source at the bottom of the story. You can probably think of 4 or 5 sites that do this regularly and that are probably open in one of your many Firefox tabs at this very minute. Do you ever get the feeling that you’ve read the same story on Engadget, TUAW and Lifehacker?  Some writers are very good about making sure they link directly to the source. John Gruber of Daring Fireball does this all the time, only rarely does he ever quote the source, and you can almost be guaranteed that it’s not the crux of the story. In fact, John Gruber is so adamant about this that he will link the title of his own post directly to the source 9 times out of 10 so if you’re reading his stuff in your RSS reader, like Google Reader, you rarely ever go to his site, but you always know that Daring Fireball is where you saw it first, it’s just in the way he writes stuff. Writers like John Gruber tend to have more journalistic integrity than the majority of  the Old Media sites and New Super Blogs that compete for your attention.  This is one of the main reasons, we the Dads tend to write about our own stuff and rarely re-blog other sites without either giving you a very healthy dose of Clearly Canadian Editorial Opinion on the subject, we figure that is why your reading our stuff in the first place. Our sincerest northern apologies if we were gravely mistaken.

In the old blogging days it was really easy to be your verbose self, everyone would link to each others site and blog rolls were a very important way to either discover a new source or find that really hot article that was making the rounds. But no one has time for this kind of exploration in the Twitter and Facebook era, everything has to be super short and posting long links with the entire title of your diatribe on The Ever Growing Concern of the Movement of the Continental Shelf and it’s Effect on Long Nose Sea Tortoises just doesn’t happen anymore. You’ll see stuff like this:

Tripod, the Green Sea Turtle by Flickr's Motleypixel

Tripod, the Green Sea Turtle by Flickr’s Motleypixel

Blogged: Cool Turtle Study

You’re back! Awesome

Sorry about the Rick Roll, I just couldn’t resist. Ah you’re back again, OK now where were we? Oh Yeah, long ass links don’t cut it today, we need to shorten them so thats why we’re rolling our own service. Hang on a minute, missed a huge part in the middle. Here we go again:

So Blogger and WordPress and bunch of other sites started to use short services like the TinyURL to fit the link and that title into and 140 character Twitter box. The problem is that when a couple million twits twitterers Tweeters folks start using the same service, the amount of short code URLs available to you and me start to dry up, so either older links get deleted or worse even they are re-used simply to allow someone else to Rickroll you in  an already too long post about their new service. So a few of your links die out, which is sad but you’ve already moved on to another project so you don’t really mind. Now what happens in the reverse scenario:  your new site is suddenly getting hit real hard, almost Digg like in the amount of visitors you’re getting. We talking about thousands of page views a day and when you open up your Web Analytics package to check out where all the traffic is coming from,  it seems to be a ShortURL service that re-used a rickroll or a NSFW link for your new page about those poor sea turtles.  Sure you’re getting plenty of traffic, and if your server survives because you installed WP Super Cache, you find out that no one stayed on the site for more than 40 seconds, afterall you did have a really nice picture of that sea  turtle. And worst of all,  the bounce rate is now at 99%. Your entire data for that period is now garbage and you can’t tell anything about your readers/visitors because the graph looks like a nail sticking out of a plank of wood and not the pretty EKG reading you have been used to for the last few months. The worst is that the source of all that traffic is from and not Twitter or Digg or organic because Leo Laporte mentioned you on TWiT Live. Even if you are a Pro user for one of these ShortURL services, you now have the pleasant task of checking your stats in TWO places.

Data Dumps already sucked and now so does your life…

So what are your options? Simply put: You Roll Your Own. If you managed to install your own site than you can install and use a service like the one from if you already have a short name like, then you can roll out something like which is only 25 characters and the rickroll link from above might only be 18 characters but at least your readers will know that your link is approved by YOU. Because you install the service on your server like the WordPress application, YOU decide the fate of your links, YOU get to see the Analytics data in your own package and if you want to be more granular, then you can review the stats that the YOURLS service provides. It’s running off of a MySQL database that you installed. If you’re hosting package only allows for one database, then you can even use the WordPress database to host the YOURLS tables. You have complete control over how the service works, you choose to make the service private, like we have down for the time being. Every will be able to click on your new shortened links, but only you will be able to create them. That is some pretty cool power right there. If you now want to tweet about some cool new study about how turtles have adapted to the warmer times and are striving in the Magdalen Isles archipelago then you can reassure all you followers that they will not be rickrolled  or hi-jacked to LonelySEODouce22’s link farm (No Link? I wouldn’t dare take you to his site).

The other major reason went with our own shortURL service was that the plug-in we had used: Twitter Tools, albeit free was getting very bloated. It was now installing three other plugins and required you to register with in order to obtain an API key for the service and for the same security reasons we wound rolling our service too. There was one major hick though, not only had the service become unreliable, first by removing the links from the automated tweets after each upgrade, forcing to verify all the settings anytime something changed and then by reposting your Twitter Digest post 5 to 10 times for no apparent reasons. When you started look for answers to these problems on the developers site, you find out that not only has the documentation all but dried up, he’s now selling his support services for his free plug-in. Please let me set the record straight, I have no problems with trying to earn some money from your hard work, if you look to the upper left hand corner of this page you will some ads. My issue with Alex Kings support policy is that if you develop and publish a plug-in which is now at 2.something version, at the very least make sure that it works in the way you state it should. If you don’t want to support everyone who uses your plug-in then charge for the plug-in itself. Like the way that Thesis charges for its template. Just because it’s open source doesn’t mean that the user wants to fix your sloppy bloated code or wait a few weeks while you try to get fix in order to keep your 2.8 and HIGHER compatibility rating. Granted, I know nothing of the way to build plug-ins or how WordPress plugins compatibility works. But I if I don’t get a warning about a conflict before I upgrade then I upgrade and if WordPress wants me to upgrade because of a security issue, then I upgrade.

What does all this ranting boil down to?

  • First: That no plug-in should be so mission critical that you site goes down if it’s not running, with the possible exception of WP Super Cache.

  • Second: You should be the only person controlling the work flow of how all of your great content is published and publicised.

  • Third: It’s YOUR valuable content: OWN IT!

So once you gotten rid of Twitter Tools or have stopped using Feedburner’s Socialize to Twitter your “MUST READ” post two hours later than you when you hit publish. And once you are comfortably rolling your own shortURL and even publish them automatically with reliable service like YOURLS and it’s WordPress plugin or even the open source plugin that you wrote because you can Then you can look up a cool little plug-in called Twidger complied from some really cool sources by a fellow Montreal podcaster and social media magnate Laurent Lasalle. Twidger is very simple beta plug-in that cleanly posts a twitter search query to your WordPress sidebar. We’ve used to go and find all tweets referencing all the 2 Fat Dads, including @ replies,  RT re-tweets and general mentions of our pretty unique handles. Sure it is living by the sword a little, but if things get out of hand we can simply disable it without affecting the way we publish our post links to Twitter itself. So you can expect to see our ShortURL a lot more and hopefully you’ll come to trust our links as much as you’ve come to trust us. I know I’m assuming a lot here, but you have made it through this incredibly long article and even managed to stay the course past a rickroll.

Thank you from the  bottom our diaper fund heart.

LifeHacker: How to install YOURLS on your Site
YOURLS: Fixing a GoDaddy and .htaccess issue
Mes paroles s’envolent: WordPress Plugin: Twidger (Laurent Lasalle’s site, the article is in English)

[UPDATED] Shortening with YOURLS and Tweetie 2 for iPhone