What is Page Redirections? And How to Redirect 301, 302 & 404 Pages?

Page Redirection 301, 302, 404

What is Page Redirection & Canonicalization?

Redirection are the techniques which allow your user and Google bots to land on an updated URL. It also helps you to prevent showing an error page or the page does not exist message to the user and bots. The redirection technique allows you to set a rule to land your users to the newly assigned URL. It also helps you to not lose your regular traffic on the site.

Page Redirection 301, 302, 404

There are mainly 4 types of redirection in SEO and it can be resolved by adding a few lines of code into the header section of .htaccess file.
To open it, go to cPanel>> .htaccess file>> Click to edit. Make sure to save a copy before editing the file.

What are the 4 Types of SEO Page Redirections?

1. 301 Redirect (Permanent Redirection)

What is a 301 Redirection?

301 Redirection maintain your SEO backlinks while redirecting to other address. It can be used in multiple cases such as:

  1. You have recently hosted a new website similar to your old one, and want to move all the coming traffics to the newly hosted site.
  2. You want to redirect the traffic of few pages to the new page
  3. You have discontinued some products or services on your site but don’t want to show an error message to the users who are coming to that page
301 Page Redirection

You can redirect your website’s URL permanently by following the below steps:

Code for www to non-www redirection

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.yoursite.com
RewriteRule (.*) http://yoursite.com/$1 [L, R=301]

Code for Non-www to www redirection

RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite.com
RewriteRule (.*) http://www.yoursite.com/$1 [L, R=301]

301 Redirection Code for Pages or Posts

# BEGIN 301 Redirects
Redirect 301 /existing-page-name/ https://www.website.com/new-page-name/
# END 301 Redirects

If you want to make multiple pages or post redirection, structure your code like this:

# BEGIN 301 Redirects
Redirect 301 /existing-page/ https://www.website.com/new-page/
Redirect 301 / existing-page-2/ https://www.website.com/new-page-2/
Redirect 301 / existing-post-3/ https://www.website.com/new-post-3/
# END 301 Redirects

NOTE: You can also make the changes using redirections plugins available on WordPress database which will help you to remain the on page seo & off page seo backlinks constant.

2. 302 Redirect (Temporary Redirection)

What is 302 Redirection?

If your website is under construction or due to any circumstances, you want to make your site off and redirect your existing users to a different URL, use the 302 Redirection method. It will help you to make your current URL live again after a few days.

Code for 302 Redirects for Pages or Posts
302 Redirection Code for a Page

# BEGIN 302 Redirects
Redirect 302 /existing-page/ https://www.yourwebsite.com/new-page/
# END 302 Redirects

302 Redirection Code for a Post

# BEGIN 302 Redirects
Redirect 302 /existing-post/ https://www.yourwebsite.com/new-post/
# END 302 Redirects

3. Rel=Canonical Redirection (Duplicate Page Redirection)

It used to notify the Google bot that the content given on the two or more URLs are the same. It’s not the two different pages. In simple words, the “rel=canonical“ tag helps to understand the crawler that even the content is duplicated on two pages but the thing is the same and index my preferred page among them. And these all can be done by using Page Redirections techniques. The noticeable point in this tag is, you will have to put the preferred URL only not the URL1 & URL2 both. Interesting isn’t it.

There are many cases where you may require to use the rel=canonical tag, few of them are as below:

A) Your website is getting opened on all the variations like the below URLs

URL 1: https://www.mithvin.com/
URL 2: https://www.mithvin.com/
URL 3: www.mithvin.com/
URL 4: mithvin.com/

B) You have added a product shoe and is available in multiple sizes such as small, medium and big. Here, your all details would be same but after filtering by user, the page URLs may look like


So, in that case, you can use the “rel=canonical” tag by following the below structure
<link rel=”canonical” href=” https://www.yourdomain.com/” />

C) If you have created any updated version of the same posts, such as privacy policy, disclaimer, payment options etc. then you can canonicalize it using the same tag like below
<link rel=”canonical” href=” https://www.yourdomain.com/your-updated-page-url/” />

D) Any website has copied your content and post it on their site. In that case, you can use the tag to mark the preferred URL.

404 Error Page (Non-Available Page Redirection)

What does 404 Error Mean?

Sometimes it happens that the user is searching for your internal pages manually and they made some spelling or symbol mistakes. At that time your 404 custom page will redirect them to a targeted URL. 404 Error can be customized for some other reasons too using the page redirections technique.

404 Error Page Redirection

How to solve the 404 Error?

Step 1: Create a custom 404 Error page Design as usual by giving some redirection options and an eye-catching layout to attract the viewers. Rename the file for your reference. E.g. 404

Step 2: Now open .htaccess file and insert the below code & save it. It’s done

Code Structure: ErrorDocument 404 /your custom 404 page name with .html extension
e.g. ErrorDocument 404 /404.html

Step 3: All the non-existing pages of your domain will be redirected to this custom page you have designed.

If you don’t want to play with these codes, you can use some popular redirection plugins for your WordPress website:-

Hope you just learned few new things from this blog. Your response will inspire me to share more knowledge with you using my experience and skill. So please like, share & leave your comment below. You can also Contact Us for any query or services such as Google Ads or Content Writing.

Also Read:

As you are a valuable reader for us, we are giving you a perk right away. Claim for your free Campaigns Audit Now.

Leave a Comment

Subscribe To Mithvin Newsletter