Free Wordpress Blog Setup

How to Get Short Branded Urls with WordPress

By Editorial Staff in Tutorials
How to Get Short Branded Urls with WordPress

With social media marketing on its peak, and URL shortening service at it’s highest demand, bloggers are turning to services like tr.im, bit.ly, or even ekey.us. There are two disadvantages of using these services. First they are not brandable, and second they are not reliable as tr.im said they will be closing down. Much thanks to a powerful script like WordPress, we can now use it to create short URLs and have our brand in it.

*Note: You cannot use this tutorial if your domain is too long.

This hack is very simple. All we are doing is instead of displaying our normal SEO Friendly URLs, we are displaying the original Post-ID URL which WordPress generates anyway with each post created.

All you have to do is copy and paste the following code in your single.php wherever you like.

<?php echo get_bloginfo('url')."/?p=".$post->ID; ?>

and it will display a URL of this sort:

http://wpbeginner.com/?p=734

Now for those of you who do not know how you will be using this code, stay updated as we will be showing you how to use this for different social media sites in our next tutorial.

This hack is not changing your SEO Friendly URLs, when someone types this URL in the box, or clicks on this URL, the URL they will actually see is your long permalink that you made using our SEO Friendly URLs tutorial.

This hack only lets you shorten your page and post URLs, but if you want to shorten an external URL using your WordPress, you can also do so by using a plugin called Short URL Plugin.

This plugin lets you create a short URL like:

http://wpbeginner.com/u/23

It also lets you track how many clicks each URL has received, so it is also a great analyzing tool. But once again this will only work if you have a short domain.

These features are handy and a good substitution until ofcourse Matt Mullewang and Automattic release the plugin for WP.me to be used on WordPress.org’s self-hosted blogs. Currently WP.me urls are only reserved for WordPress.com users as announced by Matt on WordPress Blog.

Remember to stay updated for our next tutorial in which we will show you how you can add share this links to popular social media sties.

What Next?

Digg it
Save This Page
Subscribe to WPBeginner
Stumble it
Free Wordpress Blog Setup

Comments

4 Responses to “How to Get Short Branded Urls with WordPress”
  1. Brandon Cox says:

    Thanks for the great tip. I had learned this trick a couple of months ago and had forgotten to do anything with it. Great plugin you plugged too!

  2. kovshenin says:

    Hey you might also try an alternative called Twitter Friendly Links. It’s available at the WordPress Plugin directory. The plugin page is here: http://kovshenin.com/712 (make sure you watch the video)

    ~ @kovshenin

  3. Matt says:

    This is super useful. I am currently using the tinyurl API.

  4. Kamal says:

    This is indeed a very cool trick for blogs.

    I personally like bit.ly and the evergreen tinyurl.

Share Your Opinions

Tell us what you're thinking...
and if you want a pic to show with your comment, then get gravatar!

Please make sure that you have read our Comment Policy.

Due to high volume of request from our readers, we are adding this feature that allows you to stay updated with this post's comments without having to participate in the discussion even though we would love your input as always. Don't worry we hate SPAM just as much as you do, so you will never receive any SPAM messages from our site and that's our promise to you.

Subscribe without commenting

Close Bar