This is a technical post about what I’ve discovered in creating my own custom URL shortener. Hopefully, you can learn to do the same things I did, and my experience will save you some headaches if it’s something you’re interesting in trying.
On my website, I focus a lot about decisions and discovery. I love finding out how the world works and then applying what I’ve learned to make better decisions, and I also try to share what I can along the way. I hope that it helps others.
When it came to URL shortening, I was interested by a post from Michael Hyatt, who has a tutorial on how he created his own custom URL shortener. I was intrigued, since he has a great how-to guide on his website. However, I didn’t want to pay for an additional service, so I tried to find out how to create one myself and do it inexpensively. Luckily, I discovered how to do it, and I’m happy with the results, so I thought I’d write this post to share my experience.
A couple things first, in case you’re new to the whole concept.
What is a URL? URL stands for Universal Resource Locator, but you can think of it as the name of the website page you are trying to reach on the Internet. http://www.nytimes.com, http://www.micfarris.com/about/, and http://espn.go.com/ are all examples of URLs that will take you places on the Web.
Next question, what is a URL shortener and why would I want to use one? It’s a service that allows you to create a link to one of these pages, maybe one to somewhere on your website or anywhere else on the Internet, using a much shorter link name. Bit.ly is such a service, and it’s the one that I use. Here’s an example of why I like to shorten my URLs.
I have a post on my website about Stephen Hawking and his amazing ability to communicate, even though he suffers from ALS. The link itself, as you can see below, is very long:
This link itself is 109 characters, so it takes up a lot of room. Also, if I wanted to share this link on Twitter, I’d use up 109 of the 140 characters that Twitter allows. If the link were longer, I might not be able to pass along the link at all! It would be nice to shorten this link and let people reach this article while still providing a message to interest them in following the link.
I can do this by going to bit.ly and entering the URL itself. Bit.ly will then create a shorter URL that will take me to exactly the same place:
and with my custom URL address, this link becomes:
There are a number of reasons why creating a custom short URL can be a benefit for you:
- Using a URL shortener allows you to share more with others on Twitter and Facebook. When the links you share don’t take up so much space, you can focus on your message to your readers. And it becomes especially important when using Twitter, since you are only limited to 140 characters for your tweet.
- You can keep track of the number of clicks your shared posts get, allowing you to better understand your readership. Bit.ly keeps track of the number of times people click your shortened links, so you can get a sense of which links are more popular and when people chose to click on them.
- Making a custom URL shortener allows for more consistent branding. It’s great to use a URL shortener for sharing links with, say, your Twitter followers. However, if you’re able to do this while continuing to promote your website or business, then sharing this information with your followers becomes even more effective.
So, now that you know the benefits, are you ready to learn how to create one for yourself? Great!
Here are the steps that I took in getting and setting up my custom short URL:
- Buy the URL you’d like to use for URL shortening. You will have one for your blog or website, but you’ll want to use a different URL for URL shortening. Select one that brands yourself, your website, or your business well, but keep it short (otherwise it defeats the purpose!).
- Twitter allows for 140 characters, so keep your shortening URL to 12 characters or less. I use micfarris.us for my URL shortening, but the New York Times uses nyti.ms. This way, you can tweet a shortened URL link (such as micfarris.us/WGtCik) and still have enough room to tweet a helpful message.
- Check out available web addresses. You can go to http://domai.nr/ to check out available URLs. I eventually chose micfarris.us for two reasons:
- It contains “micfarris” to further the branding for myself and my website
- The .us domains are a lot cheaper to purchase. GoDaddy sells .us domains for $3.99 for the first year, so it’s an inexpensive way to get started. I looked at getting micfarr.is (which is a domain from Iceland), but it cost $99/year, so I decided against it (for now!)
- Connect with a URL shortening service to let them know your new domain name. As I mentioned before, I use bit.ly – it’s free, and they do a great job with their URL shortening service. Here are the steps for performing this step using bit.ly:
- Sign in to your bit.ly account (or if you don’t have one, just create one)
- Go to “Settings” from the upper right pull-down menu (or click here), click the “Advanced” tab, and then click the “Add a custom short domain” link.
- Enter your new domain to assign it to your account
- Connect your new domain to the website for your URL shortening service. Here are the steps for performing this step using GoDaddy.com (the place that keeps my web address) and bit.ly (that performs the URL shortening):
- Log into GoDaddy.com, click on “My Account”, then click on “Domains”
- Click on the new domain you want to connect with bit.ly
- Under the “DNS Manager” heading, click on the Launch link
- The “A (Host)” record should be the first on the page, so we’ll want to change this to point to the bit.ly website. You’ll want to change the IP address (the four number sequence in this record) to 126.96.36.199. You should double check with bit.ly to make sure this is the right IP address (don’t just take my word for it!) To double check the IP address and for more specific information from bit.ly, you can go here.
- Wait patiently. It can take up to 48 hours for the new information to propagate the right settings through the servers. When I set up my custom short URL, it took less than an hour or so, but sometime it can take longer.
Setting up your own custom short URL for branding yourself, your website, and your business is easy. It was surprisingly painless for me to set this up, and I’m sure that you can follow these simple steps to create your own, just like I did.
Question: Have you ever thought about creating your own custom URL for Twitter? Are there other short URL services that you like? You can leave a comment below.