URL shortening is a technique on the World Wide Web in which a Uniform Resource Locator (URL) may be made substantially shorter and still direct to the required page. This is achieved by using a redirect which links to the web page that has a long URL. For example, the URL “https://example.com/assets/category_B/subcategory_C/Foo/” can be shortened to “https://bit.ly/Foo”, and the URL “https://example.com/about/index.html” can be shortened to “https://bit.ly/aO3Ssc ”
You can activate the short URLs for sharing from Social Sharing -> Short URL
Short URL Usage
The short URL usage option select where to add the generated new short URL for sharing. You can choose between two available options:
- Recommended social networks only – this includes the mobile messenger applications, Twitter and Buffer. These are the recommended networks if you plan to use short URL
- All networks – the short URL will be set for sharing for all networks. As most of the social networks do not have a limit for the message, you are not required to use that type of URL. But if you decide to switch to this model.
Supported Short URL Services
Build-in WordPress Short Links
This option will allow you to connect with the existing short URL generation plugin you have installed. That plugin should assign an event or filter to the native WordPress function. If such does not exist on your site, you can still generate a short URL with the default WordPress structure: https://example.com/?p=100
bit.ly is probably the most popular short URL service you can use. Inside plugin you need to set up the following details:
- Username – your bit.ly username
- API key/Access token key – based on the connection protocol you choose you should fill API key or Access Token key
Rebrandly is an awesome short URL generation service that you can use to create branded short links. They offer short URL domains at a really tiny price. Recommended for those that wish to create a strong brand.
To start generating short URLs you need at first have a Rebrandly account. Then you can fill the required settings:
- API Key – required to get a connection with the service. You can follow the documentation at Rebrandly knowledge base for API key generation here: https://developers.rebrandly.com/docs/api-key-authentication
- Domain ID – required to get a branded short URL. To find your domain ID visit the all domains list page https://www.rebrandly.com/domains/all and copy its ID
- Generate HTTPS version of Short URL – always force generation of https version of the short URLs
Migrate Short URLs
In version 8 we made a full revamp of the short URL cache. This allows storing a separate version of the short URL per network or even per affiliate ID. All this without overloading the post meta table. If you are using the plugin in the past you can keep the short URLs working as they are. But you can also migrate the details to the new cache and clear older data. Be aware this is irreversible – once you do the migration you won’t be able to use shorts again in version 7.
- Migrate – this will move the short URLs from the post meta table to the new plugin post cache
- Clear old data – the button will remove all previously stored shorts in the post meta table. Warning! Do not press this button before you migrate the details. Otherwise, it won’t be possible to migrate existing addresses.
Troubleshooting Wong Short URL Issue
Very rear you may see plugin sharing the wrong short URL. This may happen in case you change the permalink of the post/page or there was a mistake in the short URL API during generation. Even you do the changes plugin does not reflect them. This happens because inside Easy Social Share Buttons for WordPress we are using a short URL cache. Once a short URL is generated we store it inside the cache and do not generate it again.
If you face a problem like this you can try to use the expert options in the short URL settings:
- Deactivate short URLs cache – the option temporarily deactivates the short URL cache reading. In this case, the plugin won’t use the stored short URLs – on page load it will contact the API to get a new one. And after that, it will store the generated short URL. The option will allow refreshing the short URLs within page loading. If you use this option keep it active for a few days.
- Avoid generation of short URLs on preview pages – recommended being activated. The option prevents the generation of a short URL when the preview button is pressed (usually when the post is draft).
You can also clear the short URL cache at once. If so all stored short URLs will be removed from the plugin cache. When the post or page is loaded a fresh new short URL will be generated.