Changing or editing the URL of a webpage will affect its ranking. Fortunately there is a simple solution to this problem: It called a “Redirect“. A redirect is a way to signal the search engines that page has been moved. There are many types of redirects. A 301 redirect lets the search engine know that the URL of a specific webpage has been permanently changed. And it will automatically redirect the traffic towards the new URL.
There are many situations you might have to use WordPress 301 Redirect property.
- After moving a website to WordPress from a different platform or html.
- Changing your website address
- Changing a page/post address
Now let’s talk about how to configure WordPress 301 redirect. There are two ways to achieve this: Through a WordPress plugin and editing .htaccess file. Please note that editing .htaccess file can cause your website to screw up. So backup your website before you attempt any of the two methods mentioned below.
Method 1 – Using a WordPress Plugin
This is the reason why we love WordPress. If you need anything done at all, there is a plugin that does it. There are few plugins we can use for WordPress 301 redirect.
1. Redirection Plugin – This is the most popular plugin for WordPress 301 redirect. It is a free plugin packed with all the features you need. Options include automatic and manual redirection with 404 error monitoring. All logs are stored in back-end and easily accessed by a WordPress Admin.
2. Quick Page/Post Redirect Plugin – This is one of easiest WordPress 301 redirect plugin to use. It also supports other types of redirect such as 302, 307, and meta. One thing to notice is that this plugin does NOT modify the .htaccess file in WordPress.
3. Eggplant 301 Redirects – Funny as the name sounds, this is actually one of the most installed WordPress 301 redirect plugin. It features easy to use and option filled back-end. Simply install the plugin and you are ready to go!
Method 2 – Editing WordPress .htaccess File
We can manually edit the .htaccess file configure WordPress 301 redirect. Head over to your cPanel and access the File Manager. Open the .htaccess file with the Editor. Note: .htaccess file is a hidden file and you might have to enable the option to view hidden files from your settings.
Depending on the plugins you have installed on your WordPress website, .htaccess file may already contain some information. Don’t mess with this. Start adding the code right below such information. Any hash (#) indicates its a comment.
For example, let’s say we want to redirect a page with the permalink /old-page/ to its new permalink called /new-page/ then we would add the following code to our .htaccess file.
If you have installed WordPress in a directory inside, then your WordPress 301 redirect will need to include that directory name. Using the same example above, our redirect would look like this.
Editing the .htaccess file is an easy way to create WordPress 301 redirect. You can even use a plugin to edit this file if you don’t want to mess with cPanel or FTP. Be extremely cautious as you edit the .htaccess file as it may mess up your website.