How to create and use shortened links in WordPress? – Learn WordPress from a to z

Tutorials 0 lượt xem
How to create and use shortened links in WordPress? - Learn Wordpress from a to z thumbnail

URLs help improve your SEO score and attract users to click on your content. Links that are too long drive visitors away, while links that are too short are not compelling enough for them to click.

That’s why WordPress shortened link solutions come in handy. You can shorten your page URLs but still make them meaningful. Today’s article will focus on the benefits of WordPress shortened links as well as two methods to create a link for your website content.

Create and use shortened links

Enhance social sharing

Social platforms like Facebook or Twitter limit the number of characters you can use per post. If you write a long status, it will hide most of your shares. That’s why you need to trim your URLs to make more space for more useful content.

Shortened links also improve user experience and encourage them to share your posts easily. They can send your link to others via email, Facebook message, and text message. This quickly brings new visitors to your website.

Affiliate has become an effective marketing strategy to increase sales. While most affiliate plugins allow members to customize their links, some others do not offer this functionality.

As a result, your affiliate links will be endless and full of tracking parameters. This may discourage users from clicking on your link and purchasing the product.

Improve SEO

WordPress, by default, uses your page/post title as its URL. Your title can include articles and linking words. However, it makes no sense to have them in the page address. Instead, you should leave space for keywords.

Link shortening makes it easy to remove unnecessary words and add more relevant keywords in the same link. Plus, you can prevent Google from truncating characters on your overly long URLs. As a result, the visitor can view the entire link and click it.

You can add a shortened link button to the WordPress classic editor using custom code. There are 2 different paths you can take to achieve this, either import the code into the functions.php file in your child theme or place the code using the Code Snippets plugin.

I can try both ways so you can choose the one according to your technique. First, copy this code:

To add it to your functions.php file, you need to go to AppearanceTheme Editor in your dashboard. Now find the functions.php file in Theme Files .

theme editor

Enter the code above into the file and save your changes. You can open and edit one of your posts to check if a shortened link button has been added there.

If you are afraid that touching the functions.php file may affect website performance, use the Code Snippets plugin. Here’s how to get started with it.

Go to PluginsAdd News in your WordPress admin dashboard.

Enter ‘code’ in the keyword box.

Install and activate the plugin. It now adds a new Snippets section to your admin menu.

add new snippets

Provide the code snippet title and paste the above code.

Press ‘Activate’

shortlink button

With over 300K trusted websites, Pretty Links is one of the most popular solutions. On top of that, it gives you a statistical report on link clicks, browser clicks and geos.

Pretty Links plugin

Installing the Pretty Links plugin will follow the same steps as Code Snippets. Upon activation, you should go to the Add Links page in the Pretty Links section .

create shortened link

When you enter your site’s link in the Target URL box, the plugin will automatically create a new shortened link in the Pretty Links box. Click the icon next to the box to copy the link to the clipboard. Consider writing a description for your link in the Notes section.

You can use this shortened link on any social platform to share your content with others. The plugin will also monitor the links and keep all the stats. However, this function is only available in the Pro version.

Epilogue

I hope with these 2 ways you can easily create shortened links.

If you find it interesting, you can follow the  WordPress basics section  to know more new knowledge.

Follow fanpage to receive the latest posts:  Group

Bài viết liên quan