URL Shortening is the process of making the URLs short and precise as per the need. Shortening the URL makes it easier to share and remember the URL anytime. There are several tools and plugins on WordPress to do this shortening process. Also, certain shortened links can be tracked/monitored to check the number of clicks, performance metrics, and more useful data. In this article, let’s see how to make a URL Shortener in WordPress.
Methods to Shorten URL in WordPress
There are three possible ways to make your WordPress permalinks shorter. They are,
- With Plugin
- Without Plugin
- Using a Third-party Website
How to Make a URL Shortener in WordPress With a Plugin
[1] From your WordPress dashboard, click on Plugins from the left panel. [2] Under the Plugins section, click on Add New. [3] Search for the Pretty Links plugin in the search bar. [4] Click on Install Now to start installing the plugin. [5] Once installed, click on Activate to activate the plugin. [6] Now, click on Pretty Links from the WordPress sidebar and click on Add New. [7] Here select Redirection type, followed by the Target URL. This URL is where you want to take your users. [8] Then enter the shortened URL in the Pretty Link on the filed next to /.Note: By default, it says https://test.local/[Pretty link URL of your choice].
[9] Once created, your shortened URL will be created and displayed in your dashboard.You can also make some edits with the shortened URL and link available to share on all your social media and email address. There are also several other URL shortening plugins like
How to Make a URL Shortener in WordPress Without Plugin
[1] Go to your WordPress dashboard and click on Appearance from the left panel. [2] Under Appearance, choose Theme Editor. [3] Inside Theme editor, open functions.php file from the right section. [4] Add the following Shortcode at the end of the function.php file.add_filter( 'get_shortlink', function( $shortlink ) {return $shortlink;} );[5] Once added, click on Update file on the bottom of the Theme editor page. [6] Now open any page or post of your WordPress site. [7] You can see a Get Shortlink button on the top of your classic editor. [8] Click on the Get Shorlink button and you will be displayed with Shortlink URL. [9] You can copy and share the URL on Social media, mail, etc.
How to Make a URL Shortener in WordPress Using a Third-party Website
Apart from the two methods mentioned above, there is another way to shorten the URLs of your WordPress website. This time we are going to use some amazing URL shortener websites for help. These are some of the popular websites you should check out.
Using this website, all you need to do is copy the URL from your WordPress website and paste it into any of the above-mentioned sites to instantly generate the new shortened URL.
Related: How to Link within a Page Using “Anchor Link” in WordPress
I hope this guide helps you shorten the URL for your WordPress website URLs. Shortening the URL will be easy to remember and share with all your users on any medium in an organized way. If you have any queries, let us know in the comments section below.