How to Setup Short Domain for WordPress Posts

In an effort to boost branding people can resolve to many different things. You can opt for a good logo, a custom design, a good marketing strategy, and proper social media promotion across various channels.

But once you head over for enhanced social media promotion you will realize the need for a short domain for sharing your content. Most of this need arises from the fact that in social media the more laser-focused and targeted an update is the more effective it becomes. Using long URLs takes away the sheen from good promotional updates.

But at the same time, branding needs to be maintained, and using URL shorteners like Bit.ly and Goo.gl hurts the brand reputation. So what’s the solution to this, the solution is to use a custom short domain like we use i2r.in for Inspire2rise.com, and Pradeep Kumar from Slashsquare uses custom domains for all of his blogs ( e.g. device.is for devicebar.com) so let’s learn how to set up short domain for WordPress posts.

How to set up a short domain for WordPress posts: Buying the domain.

I know this is a bit obvious step and you might be even wondering why the a need to include this in this post. But trust me a good short brandable domain works wonders. The short domain should be linked to your core business domain in some way or another.

For example: When we chose i2r.in we had to go through a lot of other alternatives but finally decided that this one represented our core brand name in a short and easy-to-remember way. So do make sure that you choose the right domain name because a domain name is the first representative of yours to any unknown visitor on social media or other sharing forums.

How to set up a short domain for WordPress posts: Finalizing URL shortener.

Now that you have a domain you need to think of a few things before you can use it to shorten your URLs. You also have to decide whether you need a self-hosted URL shortener or use some other service like Bit.ly. You can use any of the following services to do this:

  1. YOURLS: (Your own URL shortener)

    Yourls is one the best self-hosted solution for those who want to create a URL shortener but self-hosted and something which is their own. It is a free-of-cost PHP script that can be installed on a website just like WordPress or other CMS.
    The good features of Yoast include easy installation, the ability to customize links instead of getting random characters all the time, stats page for administrators to keep track of link creation dates and other relevant information. It also allows you to create either a public service, i.e. a URL shortener website of your own, or a private service for personal use. YOURLS also provides you with an easy bookmarklet so that you can create a short URL from anywhere in your browser. It also has a WordPress plugin though it’s not official. The whole setting up is a bit technical and we will cover it in a later post.

  2. PHURL:

    PHURL is another free self-hosted solution that you can use to create your own custom short URLs. Similar to YOURLS it’s a PHP and MySQL-based script. Its features are also similar to YOURLS and the script is available for download here.

  3. Bit.ly:

    Bit.ly is the best URL shortener service out there in terms of usability, tracking, and a lot of other stuff. Bit.ly is the URL shortener of choice when it comes to making short links for posts on Inspire2rise and many other big websites.

  4. Awe.sm:

    Awe.sm doesn’t just provide metrics like Bit.ly but also provides the tracking of various social activities and it can also track multiple outcomes for tracking related to each post. It is priced around $99 per month but it’s more feature-filled and for those social media users who want to gain long-term insight and data regarding their online presence.

  5. Pretty link pro:

    Pretty Link Pro is a plugin for WordPress that allows a lot of custom link options for a one-time payment of either $37 or $97 which depends upon the number of features you need.

  6. Ow.ly:

    Ow.ly which is with Hootsuite is for those people who like all their social media in one place. Almost all of the social-related tasks can be managed from one place using Hootsuite. A Hootsuite user can use Ow.ly with a custom domain to easily shorten links. But this “VANITY URL” option is not present for free users. It is for Pro users and plans start from $8.99 per month.
    Once you do the above you only need to set DNS A record to point to their address i.e. 204.15.172.215 and then configure a few settings from within the Hootsuite dashboard and then you are all set.

  7. Droplr:

    Droplr is basically a cloud-sharing web application for sharing stuff like pictures, videos, or other files. It can also be used for custom URL shortening purposes. It has paid services which start from a base price of $4.99 per month.

How to set up a short domain for WordPress posts: Setting up short links through Bitly.

You can buy any country-specific domain in order to have a really short domain, like we have i2r.in and TheNextWeb uses tnw.co, similarly, you can buy something that will resonate with your brand. There are 101 ccTLDs available right now and there’s wide variety to pick from.

Once you are done with this then sign up for a Bit.ly account. It’s really easy and you can sign up via Facebook too if you are a lazy person like us. After your account is created verify your email address as it’s required to set up a custom short domain for your account.

After completing the above steps go to “Advanced Settings”, Under the advanced settings option there’s an option named “Personal”, Pick it up and you will be greeted by a page/prompt to enter your custom short domain.

Once this is done you have to point this custom short domain to Bitly’s services. Set your A record for the domain to 69.58.188.49, This can be done either by the DNS editor present in your domain provider’s service page or if you have the domain on a hosting then you can edit the A record from there too. By default, the A record’s hostname is @ or the URL of your short domain.

In case you are using a subdomain for setting up short domains then you need to add a CNAME in your DNS records which points the subdomain to cname.bitly.com

After doing the above steps in the correct manner you need to verify this. Log in to your Bit.ly account control panel and hit the “Verify” button on the settings page. If you have set all records correctly you would get a “DNS Configuration: OK” prompt in a green box.

Now to automate the process of building short links for your posts you need to install a custom WP-Bitly plugin for WordPress. The plugin can be found here.

After you install the plugin, go to http://www.yoursite.com/wp-admin/options-writing.php and there you will find the following settings:

How to setup short domain for WordPress posts Setting up shortlinks through Bitly

You will find the BitLy OAuth token in your Bitly account’s settings page, or you might have to generate one, which is not that difficult task.

Once you have the OAuth token just enter it there and save the changes, Now you need to put the code in your theme’s single-post.php files in order to display the short link for every post. We will share the sample code with you which you can put inside your theme to showcase the short link for every post.

<div style="padding-right: 1%;"><?php if (function_exists('wp_get_shortlink')) { ?>
<div><span class="post-shortlink"><strong><i class="icon-link"></i> Short URL:</strong>
<input type='text' value='<?php echo wp_get_shortlink(get_the_ID()); ?>' onclick='this.focus(); this.select();' />
</span></div>
<?php } ?></div>

Once you have entered the above code and done everything right then each and every post of yours will show the Bitly custom short link and every future post will have the short link generated and showing up by default, You won’t need to manually edit things every time!

I hope you understood the guide and found this post informative, If you really liked the effort then do share and recommend this post to anyone who needs to set up short links for their website!

Keep visiting for more awesome how-to guides, blogging tips, and stuff, and remember we cover,

“Everything under the Sun!”

inspire2rise official logo

keep visiting inspire2rise
Keep visiting Inspire2rise.com folks! 🙂

 Better subscribe and keep coming for more such awesome posts, this was our

How to set up a short domain for WordPress posts guide!

Follow Inspire2rise on Twitter. | Follow Inspire2rise on Facebook. | Follow Inspire2rise on Google+.

Stay Inspired to rise fellas!

Read more awesome How to guides by us:

Aditya Nath Jha is an Engineer from New Delhi, India. His areas of interest include Gadgets, WordPress, speed optimization & latest technology. When he is not busy blogging he loves to write poetry, compose his own songs and has a taste for music! Find him on Facebook, Twitter, Linked in, Instagram. And watch his videos on YouTube.


How to Setup Short Domain for WordPress Posts

1 thought on “How to Setup Short Domain for WordPress Posts”

  1. Terrific work! This is the type of info that should be shared around the internet. Disgrace on Google for no longer positioning this put up upper!

    Come on over and consult with my web site. Thank you =)

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.