Friday, June 24, 2011

Setting up a custom URL shortener with Bitly

I recently set up a custom URL shortener using Bitly. The custom domain service used to be charged for, but is now free. The domain name I used was which I paid for using some remaining balance at one of the domain registrars I use. It cost $99 for a year. I want to use it for URL shortening and as part of an image hosting service (for my own personal use and as a bit of a technical challenge). If you go to you will see that it takes you to the front page. This is unfortuante, but just the way it works. To counteract this a bit I have set to go to my business profile web site.

It integrates with Tweetdeck and Twidroyd using the Bitly API key. Any links I make from the Bitly web site, via Tweetdeck or from the Google Chrome extension use by default.

However, there are a few drawbacks to all of this that I have not found a solution to:

1. If I use the Twitter web interface it sometimes shortens my already shortened links.

2. There appears to be no way of letting anyone else use my custom shortener without giving them my bitly API key (although making a link with bitly and then replacing with works).

3. There is no way to use Bitly with the Twitter web site interface (although you can use Cotweet as an alternative).

I might consider setting up my own shortening script on my own server, but this would lead to further integration difficulties.

The set up itself was very simple. Once the domain was registered I logged into my Bitly account, went to the link shortening box and where it says "shorten with:" I selected custom domain. This took me to a page woth the instructions. I used this to make the necessary changes to the DNS settings on my domain registrars name servers. Once the new version of the zone file had propagated it all started working.

The advantage of having my own shortener is that it gives the impression that I know what I am doing on the internet (which I obviously do having founded and run a successful - and profitable - web hosting company). Its a reminder to people that I still have those skills and its useful marketing. Its also quite nice that "" is reminiscent of my professional profile web site address

Feedburner does not support the use of Bitly so I have left my email subscription service on Feedburner and moved my automatic tweeting of new posts to This was a simple case of entering my feedburner  feed address and my Bitly API key. This defaults to my custom domain and it is working correctly.

I have also installed the Bitly browser extension for Chrome so I can tweet links directly from the browser.


  1. Thanks for the tip. That's a brilliant tool.

    Do you know how to get Tweet buttons to automatically include your custom url shortener instead of using I want the tweet buttons on my Blogger posts to tweet with my own custom url shortener which is on bitly, instead of using

  2. Unfortunately not. In order to do this you would need to run a script in the background that sent the links to to be shortened,mother call up the shortened address in the page. It can be done, but it requires a lot of programming. See this page: