Chainsaw on a Tire Swing

Blogging with teeth!

Shorten your URLs with YOURLS, & then set up Tweetbot & Netbot to use YOURLS

I’ve been using URL shorteners for quite a while. Yes, I know the critiques, but URL shorteners are pretty much essential if you use Twitter or ADN or any other micro-blogging service. I want to know what people click on, how many people click, & so on. I’ve been a Bitly user for years, especially once they allowed you to use your own short domain name for free. Once that deal started, I linked granne.me to Bitly and really started using it heavily.

Then came the so-called “upgrade” to Bitly a few months ago. Boy, did they louse up their service. It went from being simple to use & very focused on shortening URLs to a wanna-be Delicious eompetitor with a stupid UI that made shortening URLs a multi-step afterthought. In disgust, I swtiched to Google’s URL shortening server, Goo.gl. It was OK, but I really wanted more control, especially by using my own URL.

Since I wasn’t happy with either, I just kinda switched back & forth between them, depending upon the software I was using at the time. Finally, I read about YOURLS, a PHP/MySQL program that you install on your server & configure to work with your URL of choice. I happened to have a short domain registered that I wasn’t really using—chnsa.ws—so I downloaded, installed, & configured YOURLS & gave it a whirl.

You know what? It’s pretty cool! I like it, & so far I think YOURLS is working out well. Consider this a recommendation: if you want to set up your URL shortening service, you should really consider YOURLS.

But there was one small issue: what about Tweetbot (the best Twitter app for iOS & Mac OS X) & Netbot (the best ADN client for iOS & hopefully soon Mac OS X)? The two ’bots provide the built-in ability to use a few URL shortening services (Goo.gl & Bitly, for instance), or—& this is the cool part—you can specify your own. Problem is, there’s not a lot of help in that area. Fortunately, I found this article at 2fatdads.com (great domain name, btw) that tells you all you need to know: How to Make YOURLS.org Work in Tweetbot

In essence, you go to http://YOURDOMAIN.COM/admin/tools.php1 & scroll down to the section titled “Secure passwordless API call”, where you will find your “secret signature token”, a string of 10 letters & numbers. Once you have that info, you enter the following in to Tweetbot & Netbot:

1
http://YOURDOMAIN.COM/yourls-api.php?signature=SECRETTOKEN&format=simple&action=shorturl&url=%@
After that, when I want to shorten a URL, {Tweet Net}bot uses chnsa.ws, my own domain running software on my own server, exactly as I’d like it.
  1. This instruction assumes you’ve installed YOURLS in its own domain, of course. Adjust as needed if you haven’t.

Comments