Then main types of redirects are 301 and 302. 301 redirect indicates the URL has moved permanently to a new location. 302 redirect indicates the URL has moved temporarily to a new location. Also 404 error responds with an error, but shows a custom page to help your visitors.
The most simple way to set up redirects in your WordPress website is to use a redirection plugin.
Redirection plugin. It is a WordPress plugin to manage 301 redirections, keep track of 404 errors, and generally tidy up any loose ends your site may have. This is particularly useful if you are migrating pages from an old website, or are changing the directory of your WordPress installation.
Quick Page/Post Redirect Plugin. This plugin provides two options: Quick redirects (301 redirects) and Individual redirects for existing pages.
SEO Redirection Plugin. This plugin allows to set up all types of redirection including 301,302 or 307 redirect and monitor 404 error pages.
Redirection with .htaccess override
This is a method to redirect WordPress page with code in case you do not want to overload your WordPress website with plugins.
Log into your server and find the .htaccess file in the WordPress root directory. You need to edit this file to set up redirects. We recommend to back up this file before editing it.
Add the following piece of code at the end of your .htaccess file to redirect one page:
Redirect 301 /old-post.html http://www.yoursite.com/new-post.html
Redirect 301 /old-post-2.html http://www.yoursite.com/folder/
Add the following piece of code to redirect the entire website:
Redirect 301 / http://newsite.com/
You can use any of these methods to set up redirects in your WordPress website. Choose the one that works for you.