A URL shortener is a service which takes a long URL and creates a much shorter URL which then forwards you to the original URL when loaded. For example, the URL http://bit.ly/18lZ8Ns, if clicked on, will redirect your browser to http://en.wikipedia.org/wiki/Cheetah instead.
Short URLs and the services that offer their creation have grown quite popular in recent years, as microblogging services such as Twitter limit you to 140 characters or less per message. In fact, some services such as Twitter offer their own URL shorteners built into the service for the benefit of their users.
The most popular of the URL shorteners is Bitly, so this post will be about setting up a custom short domain with Bitly.
It's mostly about brand recognition and trust. If you have a domain name which you are trying to make popular, having the domain name short up on links that you post in Twitter and other places can only work to your benefit. It also serves to build trust--if users who read your blog, Twitter feed, or Facebook page know that links posted to a URL with your domain are useful, they trust more links posted with your domain. It really is an upward spiral!
We'll assume you already have a domain registered. If not, go register one cheaply at http://www.nearlyfreespeech.net/.
You'll need to pick a short DNS name within your domain. Based on what I've seen elsewhere, the total number of characters (including periods) in your domain name should be 15 characters or less. For me, I decided to use go.dmuth.org which comes out to 12 characters in length. In your DNS control panel, you'll need to create a CNAME record for the name you chose which points to "cname.bitly.com."
If you're on a Mac or a Linux machine, you can then verify your DNS settings from the command line with the "dig" utility like so:
$ dig +short go.dmuth.org cname.bitly.com. 220.127.116.11 18.104.22.168
If you don't see your changes at first, DON'T PANIC. Depending on the Time To Live (TTL) settings on your DNS zone, and DNS forwarder configuration at your ISP, it may take a few hours for changes to show up. Go grab a coffee, watch a movie, or even come back the next day if necessary. Once you see DNS queries resolving for the domain name you chose, you can proceed with the next steps.
If you don't have an account on Bitly, go set one up. Then log in, click "settings", then click "advanced". You'll be at a screen like this one:
Assuming you are adding a domain for personal use, click on "Personal" to go to the next screen:
Enter the domain name you plan on using. You can use go.dmuth.org if you like, but you probably want your own. Click "Add", which will take you to the next screen:
This is just a reminder to set up the CNAME record if you haven't done so already. But you did that earlier, so click "Verify".
This screen just tells you that the verification process started and to check back later. I've never had any problems at this point though, since I always make sure the DNS record is set up well in advance.
Finally, you'll return to the Advanced Settings screen:
If your domain was verified, it will show up in the drop down list of Short Domains. Select it, and any future links created with Bitly will be created with your short domain.
That wasn't so hard, was it?
The Bitly API is actually easier to use than you think. While Bitly does mess with API tokens, they now use OAuth and the like so that other sites can connect themselves to Bitly and use the service to shorten links on your behalf. The best of these services is Buffer, which lets you manage social media accounts on multiple sites, including Twitter, Facebook and LinkedIn. Connecting Bitly is rather easy under the settings page--just click the "Connect Bit.ly" button on the settings page, choose "Allow" when Bitly prompts you, and all future links you post to that social media source on Buffer will be shortened.
As always, like, favorite, whatever... and don't hesitate to reach out if you have any questions, or leave a comment below if you prefer.