List of content you will read in this article:
There are plenty of useful features within WordPress that allow you to create and manage a website without any programming knowledge. All this is possible thanks to the seemingly endless number of plugins the built-in plugin repository offers. Today we will talk about the redirection plugin for WordPress, show you how to install it, and how to use it.
If you want to find some other useful WordPress plugins for your site, check out our “Best WordPress Plugins to Make Your Site Attractive for Visitors” lists.
Before we delve into the installation, however, let us first establish What is a WordPress Redirect, how they help your site, and why you should redirect old pages to newer, more relevant ones instead of completely deleting them.
What is Redirection?
Have you ever clicked on a page and while waiting for it to load, its URL suddenly changes to a completely different one? This is especially noticeable with a slower internet connection. Well, if this has happened to you, then you have already experienced a webpage redirect. It is the process of making a certain page load when the URL of a different page is entered.
For example, you have a page on your site called www.yourdomain.com/blog/biggest-sites-of-2020 but 2021 came, and you wish to update it, so you create a page named www.yourdomain.com/blog/biggest-sites-of-2021. Now you do not need the old page anymore, but it has a good SERP (i.e., Search Engine Result Page) ranking. Thus, you set up a redirect that automatically takes users to www.yourdomain.com/blog/biggest-sites-of-2021 when they enter www.yourdomain.com/blog/biggest-sites-of-2020 into the URL bar.
Types of Redirects
Before we delve into the process of setting up redirects, it's important to understand the different types of redirects available:
- 301 Redirects
A 301 redirect is a permanent redirect that tells search engines and browsers that the original URL has permanently moved to a new location. This type of redirect is ideal for when you have permanently moved content to a new URL, and you want to maintain SEO value and transfer link juice to the new page.
- 302 Redirects
A 302 redirect is a temporary redirect that informs search engines and browsers that the original URL is temporarily moved to a different location. It's useful when you expect the original URL to return to its original location shortly.
- 307 Redirects
A 307 redirect is similar to a 302 redirect but is used for temporary redirections in HTTP/1.1 protocols.
- 404 Redirects
A 404 redirect, or "soft 404," is a custom redirect that takes users to a designated page when they encounter a "Page Not Found" error (HTTP 404). This helps retain visitors and provides alternative content options.
Why Use Redirects?
The root of this question lies within the complex practice of SEO (i.e., Search Engine Optimization), however, we will try to briefly explain it. When a search engine’s robot crawls your site, it gives a rank to each page on how good the content is for displaying on SERPs. Based on the rankings that all the pages in the site accumulate (and a few other factors), the site earns authority with that specific search engine.
When a certain page is no longer wanted by the site owner, if he/she were to delete it, the rankings for that page would be lost and the overall authority of the site could potentially decrease, possibly making the other pages on it also show up lower on the SERPs.
Instead of deleting the page, the owner sets up a redirect to a newer, more relevant page so that the rankings for the original page are not lost, but transferred to the new page, thus, not affecting the site’s authority. All this is done to create more natural traffic from search engines.
When to Use Redirects in WordPress
Redirects are crucial in several situations:
- Changing Permalink Structure: If you decide to change your WordPress site's permalink structure, implementing 301 redirects ensures that your old URLs are redirected to the new ones, preventing broken links and preserving SEO rankings.
- Updating or Moving Content: When you update or move content to a new location, using 301 redirects ensures that visitors and search engines are directed to the new page, avoiding the frustration of encountering broken links.
- Consolidating Multiple Pages: If you have multiple pages with similar or duplicate content, redirecting them to a single, preferred page can help consolidate link equity and improve your site's SEO.
- Domain Changes: If you change your domain name, setting up 301 redirects from the old domain to the new one will help maintain search rankings and ensure a smooth transition for visitors.
- Handling Broken Links: When users or search engines encounter broken links on your website, setting up appropriate redirects will ensure they are redirected to relevant content, enhancing user experience.
How to Set Up Redirects in WordPress
Traditionally, redirects were created by writing code, however, with the convenience of WordPress plugins, there is no longer a need for that. The Redirection plugin is one of the most famous WordPress plugins. It manages 301 redirections and supports PHP versions 5.4 and higher.
Installing Redirection Plugin
Step 1: First of all, log in to your WordPress dashboard.
Step 2: On the left-most menu, hover over Plugins and click on Add New.
Step 3: On the newly opened page, type Redirection into the search bar and look for the plugin, click Install Now once found.
Step 4: After installing the plugin, activate it by clicking Activate.
Now, we will have to perform the first-time setup. Head over to the tools menu and you will be greeted with the Welcome to Redirection page. It provides some basic information about the plugin.
Step 5: At the bottom of the welcome page, press on Start Setup.
Step 6: On the next page, you can select the following 2 options: monitor permalink changes and keep logs of all redirects and 404 errors. Select them based on your needs and click on Continue Setup.
Step 7: The redirection plugin uses REST API, thus on the following page, every option should be automatically checked. If not, make sure that they all are and click on Finish Setup.
Step 8: Wait for the setup to complete and click on Finished.
Congratulations, the first-time setup is done, and the Redirection plugin is ready to use.
How to use the Redirection plugin?
Now that you have successfully installed the plugin, let’s learn how to use it.
Step 1: Hover your cursor over the Tools menu and select Redirection.
The home page of the Redirection plugin is split into two sections:
- Previous redirections
- Adding new redirections
Step 2: Go to the Add new redirection section.
Step 3: Enter the source address in the Source URL field.
Step 4: Type in the destination address into the Target URL field.
Step 5: Click on Add Redirect.
For example: Redirecting http://monovm.com/gallery to http://monovm.com/photo
How to Redirect URLs via .htaccess File
The .htaccess file is a powerful configuration file used to modify the server's behavior. To set up redirects using the .htaccess file, follow these steps:
- Backup Your .htaccess File: Before making any changes, create a backup of your .htaccess file. This step ensures that you can revert to the original state if anything goes wrong.
- Access Your .htaccess File: You can access the .htaccess file via an FTP client or through your hosting provider's control panel.
- Add Redirect Code: To create a 301 redirect, use the following code:
Redirect 301 /old-url/ https://www.example.com/new-url/
Replace "/old-url/" with the old URL path and "https://www.example.com/new-url/" with the new URL.
- Save Changes: Save the modified .htaccess file and upload it back to your server.
Redirection by John Goodley
- Begin by downloading the Redirection plugin from the WordPress plugins store, if you haven't done so already.
- Once downloaded, install and activate the plugin.
- Locate the Tools option on the left side menu panel and click on Redirection.
- On the top section of the page, you will find the "Add New" button. Click on it to proceed. In the Source URL field, enter the slug of the old URL. Then, in the Target URL field, provide the slug of the desired new URL for the redirection. Finally, select "Add Redirect."
- Your redirect is now live. To ensure its functionality, access the page's old URL and verify that it redirects to the new URL. If the redirect doesn't work, try clearing your browser's cache and attempt again.
Redirection by All in One SEO Plugin
If you are already using the "All in One SEO" plugin for your WordPress website, you can also manage redirects with it:
- Install and Activate the Plugin: If you haven't installed the "All in One SEO" plugin, navigate to "Plugins" > "Add New" and search for it. Install and activate the plugin.
- Access the Redirects Module: In your WordPress dashboard, go to "All in One SEO" > "Redirects."
- Add New Redirect: Click on "Add New Redirect" and enter the old URL in the "Source URL" field and the new URL in the "Target URL" field. Select "301 Moved Permanently" as the "Type."
- Save Changes: Click "Add Redirect" to save your changes, and the plugin will take care of the redirection process.
Learning how to use redirects for web pages that are no longer wanted is an essential skill in website administration. It is not only a good SEO practice but also a great improvement for user experience; instead of seeing 404 page not found, they are automatically redirected to a related page. We hope this blog has taught you a little about redirects and their importance.
If you run into an issue while trying to install or set up the Redirection WordPress plugin or have more questions about how to use it, please leave a comment down below.