Running a WordPress website, sometimes we need to change the URL, slug, or Permalinks of posts for special purposes. In this case, you should make sure that you have done a 301 redirection so that the old post can be correctly linked to the new one. By this way, you can keep your visitors as well as the page ranking in the search engines.
This tutorial introduces two easy ways to guide you how to redirect WordPress pages: by utilizing a plugin and by coding stuff. With the step-by-step explanation and carefully guidelines, even WordPress beginners can successfully achieve this process.
Redirect WordPress Page with a Plugin
As WordPress is flexible and offers powerful plugins to enable users to extend the website functionality, using a plugin is the easiest way to redirect visitors from one post to another. We have listed out the top 5 WordPress redirection plugins in the following.
Simple 301 Redirects
Simple 301 Redirections offers an easy way to redirect orders to any other page on the website. Generally, you cannot preserve your URL structure if you transfer the website to WordPress. However, this plugin can help you make it. After building up 301 redirects, visitors can go to your new page.
Quick Page/Post Redirect Plugin
This plugin is helpful and gives you ways to redirect pages to any other. It comes with a lot of useful features and the allowance to put a rel=”nofollow” attribute, change the defaultURL, and many other. Note that, this option does not allow the nofollow link.
Permalink Finder Plugin
If WordPress cannot find a permalink, this plugin can detect the problem and inform you at the very first time. It goes through teh whole database and pick out any words that seem similar to the found bad links. Then, when someone visits your website, they are taken to the right place rather than the former bad one.
Redirection is a very useful and practical plugin that helps to detect any 301 redirection in WordPress websites. With this tool, you don’t have to worry about this kind of problem anymore. When you move your article, posts, and pages to a new website or change the category of a post, it can lead visitors to the right place automatically.
Change Permalink Helper
This 301 plugin is the most easy to use and rich featured on I have ever tried. It can find a post in regard to its slug and then, it corrects the problem and link to the exact place.
Quick Page / Post Redirect Plugin Instruction
To help you better understand the operation of redirection plugin, today, we just take the Quick Page / Post Redirect Plugin as example to show you the detailed utilizations.
First of all, you should install and active the Quick Page / Post Redirect Plugin. Once activated, it adds a Quick Page / Post Redirect meta box to all pages / posts and add a Redirects Options in the right menu bar.
You can start to edit the post / page you want to redirect directly by configuring the Quick Page /Post Redirect box.
Turn on the redirect by selecting the checkbox on Make Redirect Active and add rel=”nofollow” to redirect link if you want. Then, enter the URL link where you want to redirect readers to. At last, choose the type of redirect, which is 302 by default. As our post / page is permanently moved to a new one, we choose 301 permanent redirect.
In addition to editing single page / post, you can also set redirect for multiple URLs by hand. Go to Redirect Options -> Quick Redirects, you can set redirects for various links. To add these additional 301 redirects, put the URL you want to redirect into the Request field and the place it should redirect to in the Destination field. Note that the Request field should be relative to the ROOT directory and contain the / in the beginning, and the Destination field can be any valid URL or relative path from root directory.
Moreover, you can customize the entire redirect options from Redirect Options -> Redirect Options. You can import or export your redirects, determine whether use Custom Post Types, hide meta box for specific posts, use jQuery, and so on. As well, you can configure the Override Redirect Options to turn off all redirects or redirect all links to one link, and so on.
Redirect WordPress Page using .htaccess Override
However, some webmasters do not like to use a plugin but prefer to manage the process by hand. Especially some people think that too many plugins many slow down the website speed and consume server storage. So, in the following, we also introduce another method to redirect WordPress page with code.
First, log into your server and find the .htaccess file in the root directory. Note that there may be other .htaccess files in the other folders, so make sure you find the right one in the root folder.
Just select the file, right-click on it, and you can see a series of options, just click on Edit to start to redirect. Then, you can see the following codes, but note that don’t mess any of the existing code in this file. We suggest you to add a blank line after RewriteEngine On but before IfModule to do the 301 redirect.
Actually, it is simple to do 301 redirects with code. You can easily add the following Rewrite Rule in the new blank line.
RewriteRule ^old-slug$ http://yourdomain.com/new-slug [L,R=301]
Only note that you should change the old-slug to the slug of the post / page that you are trying to redirect. Besides, the slug is not the entire URL, but only the relative URL of your homepage. For example, if your homepage relies on www.yourdomain.com, and the article we are handling with is at www.yourdomain.com/old-post-slug, then the slug is old-post-slug.
As well, you should replace the url yourdomain.com/new-slug with your new post link. Don’t do any changes on [L,R=301].
At last, be sure to save these changes in the file. You can test the redirection by entering the old URL in the browser. If it brings you to the new URL automatically, you completely finish the process. Otherwise, you should check out for your operations.