Before we try to learn how to add 301 redirects to WordPress, we need to understand what they really are. If you run your own website, it is a must to understand the ‘when’ and ‘how’ of using these. If you are ignorant on the topic, you could be losing a lot of organic traffic for your website and ultimately customers for your business. So, let’s get to the basics first.
What Are 301 Redirects?
To keep it simple, we can say that it is a way of diverting the traffic from one page to the other but ultimately getting it to the right destination. You can actually compare it to a traffic diversion of the roads when some repair or maintenance work is being carried out. The traffic is re-routed but connects to your destination. In a similar way, when you are making changes to your website, including changes to URLs of posts and web pages, you could hypothetically lose customers who are accustomed to the old URLs. These redirects help the customers using old URLs to get to the right URL by creating a diversion.
When Are 301 Redirects Used?
It is common to use these during the course of eCommerce website development and restructuring. There are some other redirects such as 302 and Meta Refresh, which are used often. A 301 Redirect is used when the URL or Permalink has been moved permanently, whereas 302 Redirect is used in case of a temporary move. Effectively, 301 Redirect transfers 90% or more traffic to the new URL.
The other situations wherein Redirect 301 is used are in the following circumstances:
- Changes to your WordPress installation directory
- Addition of SSL to the WordPress site is planned
- You want to change your homepage to a non-www version from the current www version
- Change of domain
- Compilation of multiple posts into one single post
How Can 301 Redirects Be Added?
The 301 Redirects can be added manually as well as with the help of WordPress plugins, which make the work quick and easy. These are the troubleshooters when a 301 redirect is required:
1. Simple 301 Redirects
Just as the name indicates, it is the simplest, most reliable and most common plugin choice of web developers for adding 301 redirects to WordPress. To get started, you have to download the plugin from the WordPress repository. Once the plugin is activated, open the settings and go to 301 Redirects tab. Add the old and new URLs in appropriate boxes and save the changes. That’s it. You can also use ‘Wildcards’ within this plugin. Do not forget to put an asterisk (*)after the folder name to be redirected.
2. Safe Redirect Manager
This plugin does not require any technical knowledge and hence is a favorite not only among web developers but also among the content writers and bloggers. It has a large number of useful features such as prior scheduling of redirects and advanced options for an addition of HTTP status codes. It is available in multiple languages making it accessible to a larger segment.
After downloading the plugin from the WordPress repository, wait for it to be activated. Under the tools tab, go to the Safe Redirect Manager. Locate the ‘Create Redirect Rule’ at the top of the page and click. In the redirect settings, fill in the appropriate URLs as required. Set the HTTP status code manually as “301 moved permanently”. Now, you can choose to schedule or publish the 301 Redirect.
3. Redirection WordPress Plugin
This plugin is recommended for website developers as it sports many useful features and is available in more than 25 languages. As soon as you make a change to the URL of your WordPress post, it adds a 301 redirect to your website. It is also useful from an SEO perspective, 404 error monitoring and custom redirection methods.
This can also be downloaded from the repository. Once activated, go to the Tools tab and choose Redirection. Define the URLs as source and target and click on ‘Add Redirection’. It is as simple as that.
4. Yoast SEO plugin
This popular plugin is an HTAccess tool. It basically helps in editing a .htaccess file and can be used for adding 301 redirects to the website. The use of this plugin is recommended only for those who are comfortable editing a .htaccess file. Do not use this plugin if you are not comfortable editing .htaccess files.
On the WordPress dashboard, choose the SEO tab and go to ‘Tools’. This will display all the built-in tools for WordPress. Use the File Editor tool and edit your .htaccess file. You will be able to see two boxes: one for .htaccess file and another for Robots.txt file. You can enter your redirection code in the .htaccess file box and save the changes.
In conclusion, it is important that you understand and implement 301 Redirects to WordPress correctly from an SEO perspective as well as a user perspective. You would not want to lose your SEO ranking because of an old URL not redirecting to a newer one. Hopefully, this article has been able to show you how important and easy it is to use the 301 Redirects.
Micheal Anderson is an avid WordPress website developer working in eCommerce website development services with Techmagnate in the Boston, USA.