This is a complete guide to create a URL shortener app with WordPress.
Short links are really important for social media marketing, as you can gain traffic to your posts or online shop. You can also use short URLs for email marketing or newsletters. Therefore, this guide will show you step by step how to build a URL shortener tool within your WordPress website.
What is a URL shortener app?
A URL shortener is a tool that allows you to present long URLs in a short format. It’s as simple as that. You take a very long URL, and generate a short link that you can share on social networks or emails.
Why create your own URL shortener in WordPress
Many people who have WordPress websites still use URL shortener services external to their site. However, you might want to consider building your own URL shortener app within WordPress and stop relying on third-party services.
Here are some important reasons to replace a third-party short link service with your own URL shortener tool:
- Services like Bitly, TinyURL, or any other short link service are generally associated with spammers. Therefore, they are less effective to use for email marketing, as your emails containing third-party short URLs may end up in the spam folder.
- Nothing guarantees that the companies that provide URL shortening services will last as long as your content will last on the Internet. Short link services can be shut down at any time, and it is best that the short URLs are hosted on your own hosting so as not to rely on third party services.
- Creating a URL shortening application does not require programming skills. With the help of WordPress plugins, you can create a beautiful and useful URL shortener application without programming skills.
What you need to build a custom URL shortener in WordPress
Normally, to generate short links in WordPress, you just need a plugin that allows you to do it. You install the plugin, activate it, and start creating short URLs.
A good option to create short links in WordPress is the Pretty Links plugin. It is the most used plugin as of June 2022.
However, in order to create short links on your website, users will need to know how to use WordPress. That’s why in this guide we will show you how to allow users to create short URLs from the frontend of your website.
This way, your social media marketing or email marketing team won’t have to know how to use WordPress to generate short URLs. You can even create an affiliate link system that a member of your team can manage from the frontend.
For this you need the WP Frontend Admin plugin, which allows you to display any wp-admin URL in the frontend of your WordPress website.
You can try the premium plugin on your website for free for 7 days.
After installing and activating your URL shortener plugin (Pretty Links in this case) and WP Frontend Admin, you can proceed to create the pages that will allow your users to create generate short links on the frontend.
How to create short links on the frontend
We have a tutorial where you can learn how to allow users to create pretty links on the frontend. You will display the Pretty Links wp-admin page on the frontend, and your users will be able to add new short URLs from the frontend, without using wp-admin.
Here’s a preview of the frontend Pretty Links page:
Here’s what the Add New Pretty Link form will look on the frontend:
How to view link tracking reports on the frontend
We have a tutorial where you can learn how to view your Pretty Links click reports. This is great to track your short links’ performance.
Start using your own URL shortener app
To be able to generate short URLs on the frontend of your WordPress website, users need to have the Administrator or Editor roles.