In this post in WordPress tutorials, I’ll explain different ways you can use Custom URL Shortner with Jetpack Sharing module.
Jetpack is often regarded as the must-use plugin for a WordPress installation. Sharing module of Jetpack allows you to add sharing buttons for different social networks at the end of your posts, pages and archives. Jetpack’s sharing module uses wp.me URL shortner to shorten your post’s URL while sharing which is WordPress.com’s URL shortner. Moreover, the same URL is also used by the Jetpack publicize module.
However, if you don’t like wp.me URLs and would like to use bit.ly or even better, your custom URL shortner with Jetpack Sharing module. Additionally, you can use them with Jetpack, without editing any code.
Why You Should Your Own URL Shortner
One of the most important reason is branding. When your post’s URL is shared on twitter or any other social network, you wouldn’t like your potential users to read the post URL’s to be on wp.me domain.
All the major blogs and news websites use Shortlink domains which is a play on the website’s main domain. For example, time.com uses ti.me, Google uses goo.gl. You can also use one letter domains like twitter uses t.co. Or, you can also opt for a two letter TLD if your main website is on a three letter TLD as used by slate.com.
How-to Use Custom URL Shortner with Jetpack Sharing
Choosing URL Shortner
First of all, you need to decide what URL shortner you want to use. There are two options:
You can install Bit.ly’s official plugin WP Bitly. You can use this plugin if you want to use bit.ly service. You can either use bit.ly URLs or change default shortner in your bit.ly account. To use this plugin you’ll need a free bit.ly API key.
Additionally, you can use a custom domain on bit.ly and set it as default. You can either create a meaningful sub-domain like on.example.com or u.example.com, or you buy a shorter version of your domain name, for instance, by omitting vowels or top-level domains like .co, .io, .me.
WordPress’ Default Permalink
If you would like to use WordPress‘ default permalink structure as shortlinks e.g. example.com/?p=1234 and not any other service or domain then you do not need to install any service.
Install Shortlinks for Jetpack sharing buttons plugin
Once you’ve installed the required plugin for the service you would like to use, install ‘Shortlinks for Jetpack sharing buttons‘ plugin developed by Automattic’s Jeremy Herve. The plugin will let you use the service and the domain you’ve chosen in the first step.
Now when your readers share any post, the new shortlink will be used instead of wp.me.