How to Create Custom, Trackable, Short URL’s For All Your WordPress Posts and Pages

Last Updated on December 29, 2022 by 23 Comments

Editorial Note: We may earn a commission when you visit links on our website.
How to Create Custom, Trackable, Short URL’s For All Your WordPress Posts and Pages
Blog / Tips & Tricks / 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)

wp-default-short-url

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.

jetpack-wp-me-short-url

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.

nathan.bw

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”.

Bitly-advanced-settings

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–69.58.188.49

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

WP-Bitly

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

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.

Feature Highlights

  • 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

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.

In Conclusion

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

Divi

Want To Build Better WordPress Websites? Start Here! 👇

Take the first step towards a better website.

Get Started
Divi
Premade Layouts

Check Out These Related Posts

Splice Video Editor: An Overview and Review

Splice Video Editor: An Overview and Review

Updated on March 10, 2023 in Tips & Tricks

Video is a valuable form of content for social media. Unfortunately, creating quality videos is usually a long process that involves moving mobile footage to a desktop app for editing. However, mobile editing is on the rise. Apps such as Splice Video Editor make it possible to efficiently create...

View Full Post
How to Use Font Awesome On Your WordPress Website

How to Use Font Awesome On Your WordPress Website

Updated on September 16, 2022 in Tips & Tricks

When given the choice between using a vector icon or a static image, it’s a good idea to go with the vector. They’re small and fast to load, and they can scale to any size without a loss of resolution. Font Awesome is a superb library of vector icons that you can use on your websites,...

View Full Post

23 Comments

  1. Would have liked to have seen the step by step for setting up, connecting, and using YOURLS with WP.

  2. I find your posts very much helpful for peoples who want to rank better on Google. Search engine prefer short URL with keywords. Recommend the article for Search engine optimizes.

  3. I’ll be quick: tr.im by San Francisco-based company Gravity4 bests bitly in every single aspect.

  4. Interesting article. I never heard of Pretty Link plugin and I never tried Jetpack plugin. Thanks for sharing information on these plugins. About first strategy, if people are concerned in SEO I don’t think they would go with the wordpress default option!

    Last step might be complex for many users like me but I am truly interested to use that strategy. I suppose I need to study about that first before implementing.

  5. nice information, I hope it will help me to shorten all the URLs for my forum. Now it’s really hard to remember.

    Thanks for sharing

  6. Bit.ly custom short url can be the good option but seems hassle full; even though I’ll like to give it a try.

  7. Hi Nathan, Thanks for this great post.

    I’ve always been a fan of Bitly.. Though I’ve been considering YOURLS also. But either way, shortening my URL has always been helpful especially on twitter 🙂

    Thanks

  8. Out of these options, bitly is probably the best choice. Personally, I use Hootsuite and take advantage of their URL shortener. Since I’m using it to publish to social media anyways, it makes my life a lot easier. But I do like bitly.

  9. I have used bit.ly with great success, setting up branded is relatively easy to do. It’s great for sharing your own content but help keep track of traffic when send people to other peoples content. Another use I have found is putting bitly links on print I then you can track how many people have used the link on your flyers.

  10. going to try some of it soon… might be useful for facebook marketing.

  11. I’ve been using yourls for a good few years now and have to say It really is a great way to keep tabs on your link activities. Also like being able to change the destination of an existing link.

  12. Well, yourls can give you few more things bitly cannot:
    * you have complete control over your short urls
    * you can change underlying link without changing the shortlink
    * you don’t share stats with other users – in bitly you have to

    This is really important – imagine: you’ve wrote a review and linked to the product, but you didn’t add reflink parameters in url – well, in that case you have to correct the link everywhere you’ve posted it.

  13. Great tips. I especially like the Bit.ly custom short url option, may have to give that a try. Thanks!

  14. Bit.ly now adds their affiliate link to your shortened urls making them useless on sites that do not allow affiliate links, which includes Pinterest among others. You also can’t use the bit.ly links in Kindle books, which many authors have done in the past. Affiliate links are not allowed in Kindle books.

    YourLS and Pretty Links are wonderful alternatives that are completely under your own control.

    • Wow, I didn’t realize Bit.ly did that! Do you have any further info on them adding their own affiliate link to your shortened urls? I can’t seem to find any.

      • I was using Tiny.cc which I just realized doesn’t exist anymore, but I also ran into this issue trying to do a redirect using their link. Can’t remember where now. I gave up and went back to the long link!

  15. Nice article but just wanted to add in that you could use a wordpress plugin called Premium URL Shortener to create your own url shortener without the help of bit.ly for your own site. You can also make it private by the way. This will also be a good use for creating custom trackable urls for your wordpress pages and posts. What do you think?

  16. Thanks for the article. It’s really useful.

  17. When I first tried to have a custom branded short URL, I installed wordpress and created the links manually with pretty link lite. It was fine but a tiring work to do. Then I used bitly which made it easy for me to create the links on auto with the plugin.

    I had to remove the plugin as it was conflicting with site’s canonical url. Also it would auto create a short link for every link/image I post into my website.

    • hmm, Bit.ly sounded like a good option for me, but this sounds like a hassle. Maybe has been fixed in later versions?

      • What I meant was, Bitly is good but their official wordpress plugin made my canonical URL into that short links, making the site to loop infinitely. I posted the issue on their plugin page but no response whatsoever. I am gonna check and see if it has fixed yet.

Leave A Reply

Comments are reviewed and must adhere to our comments policy.

Get Started With Divi