How to Create Custom, Trackable, Short URL’s For All Your WordPress Posts and Pages
URL shorteners have been around for a while. Their popularity skyrocketed with social networks like Twitter as they made it possible to share long links on a platform with strict character limitations.
Other uses for shortened URL’s include tracking clicks, disguising the target URL, and “beautifying” a link that may otherwise include a garble of randomized characters.
A WordPress user may also want to use short URL’s for all of these reasons. Sharing their content on social media (Twitter or otherwise) is more easier and more elegant with short URL’s.
Additionally, tracking helps to gauge the effectiveness of social strategies, beautifying keeps links attractive and “on brand” (more on that later), and finally disguising or “cloaking” a link can be used for affiliate marketing–though you will want to be careful how you go about it.
For all of these reasons we’re going to use today’s post to look at three different ways WordPress users can create their own customized and trackable short URL’s for each and every WordPress page or post on their site.
The Default WordPress URL Shortener (& Jetpack Option)
But wait a second, doesn’t WordPress already have a URL shortening feature?
Yes. And if all you’re after is something a bit shorter than your full permalink this option might be right for you.
What the default WordPress URL shortener does is simply replace your full permalink with the post or page ID. This should shorten your link considerably (especially on posts/pages with long titles) but if you happen to have a long domain name you may still be stuck with something quite unwieldy.
If you have the Jetpack plugin installed however, you can easily activate the link shortening feature there which uses the WP.me domain to shrink your links even further. This will certainly make sharing on social networks easier no matter how long your regular domain name is.
Either way though, using the default WordPress URL shortener or the Jetpack powered WP.me option, you do not get the benefits of tracking or custom branding that the other options in this post offer.
Creating Custom WordPress Links with Bit.ly
Bit.ly is definitely one of a handful of extremely popular url shortening services, all of which you can use without much effort. But if your goal is to have a shortened link that is branded specifically to you and your domain then a few extra steps are necessary.
The first thing you need to do is purchase a separate, shorter domain, that you then link to your Bit.ly account. This allows you to use Bit.ly just like you normally would but the difference is that the shortened links it provides you with will use your custom domain instead of theirs.
Combined with the WP Bitly Plugin and you have a wonderfully customized short url that is generated and tracked from within WordPress itself. Here’s how you do it.
Adding Your Custom Short Domain to Bit.ly
In order to create your own custom bitly powered short URL you will need to follow the four steps below.
Step 1: Find and purchase a short domain. You can use any domain purchasing service or tool you like. Domainr.com is a great one for short url discovery. I was able to use it to quickly find a shorter version of my own domain.
Step 2: Add your new custom domain to Bit.ly. The next step is to go to your Bit.ly account (or create one if you don’t already have one) and add this custom domain via the advanced settings panel. Just go to your profile > settings > advanced and then click the prompt “Activate a Branded Short Domain for personal use”.
Step 3: Point your custom domain’s DNS Host to Bit.ly. Using whatever service you chose to register your domain, create an A Record in your DNS settings that points to Bit.ly’s IP address–184.108.40.206
Step 4: Wait. It can take up to two days for your new DNS settings to verify. After it does though all you need to do is use Bit.ly like your normally would. Except now, it will generate short links with our custom domain name.
Pretty easy, right? But what if you don’t like the idea of having to go to Bit.ly every time you want a link shortened? That’s where the plugin option can come in real handy.
Simplifying with the WP Bitly Plugin
The WP Bitly plugin brings the power of Bitly right into WordPress itself with just a few clicks. By combining the simple functionality of this plugin with the steps above however, the Bitly generated links within WordPress will use your custom domain too.
Step 1: Install WP Bitly. Navigate to Plugins > Add New and then search for and install WP Bitly.
Step 2: Insert the Bitly WordPress access token via Settings > Writing. There is a link there which will take you to the appropriate Bitly page.
Step 3: Use your new custom short links. Every time you click the “Get Shortlink” button in your WordPress editor from now on it generate your custom Bitly link right in WordPress.
You will be able to view your full stats on Bit.ly or you can see individual link stats within the WordPress post or page editor via a new metabox generated by WP Bitly.
Creating Custom WordPress Links with Pretty Link
Another option at your disposal is the popular Pretty Link plugin. There are both lite (free) and premium versions of this plugin, but the free version will provide you with a surprising number of very useful features (see below).
Essentially what Pretty Links does, in terms of link shortening, is what WordPress itself already does. The big difference being that Pretty Links allows you to then track and manage those short links in a number of useful ways.
- Tracks number of hits per link
- Tracks number of unique hits per link
- Generates charts and reports
- Allows you to organize links into groups
- Turn tracking on and off
- Create nofollow/noindex links
- And much more. Not to mention some pretty impressive upgrade features for premium users.
There isn’t a lot of explanation required for using this plugin. At least not that needs to be included here. Once you have it installed there is an overview video, tutorials, and plenty of help text provided for getting the most out of it.
Creating Custom WordPress Links with (Better) Yourls
Finally we have what is probably the most complex and labor intensive option: Yourls integration with WordPress.
Yourls stands for “Your Own URL Shortener”. It is “a small set of PHP scripts that will allow you to run you own URL shortening service (a la TinyURL or bitly)”.
What this means is that like the first option above you will need to buy a short domain and then use these scripts to create a private URL shortening service that uses that domain name. Instructions for that process can be found here and here.
Then, you will need to download and install the plugin Better Yourls which essentially does what WP Bitly does but for your new Yourls URL shortener.
Why would you want to go through the trouble of creating your own entire service with Yourls? Well, in all honestly, most people will not. Those who do are probably just messing around and enjoy hacking stuff together for the fun of it.
The only legitimate reason I would recommend you go this route is if it is extremely important for you personally to own and control all of your link data. If that is the case then this option is a great boon as it’s free and only requires your time to pull off.
Having your own custom, trackable, short URL’s has a lot of practical uses. It ensures that all of your links are promoting your brand instead of someone else’s, gives you tools for measuring the impact of your link sharing strategies, and of course makes the act of sharing your links easier in the first place. Among many others.
The three options I’ve explored in this post are not the only ones available to WordPress users–as is usually the case with WordPress. They are however the three options I would recommend WordPress users pick from, based on my personal research and experience.
Which of the three options makes the most sense for your project? I’d love to hear about it in the comments below. Also, if you know of another method (or you’ve used another), please feel free to share it with the community here–especially if is better and/or simpler than the options I’ve shared above.
Article Thumbnail via Fine Art // shutterstock.com