301 Redirect And How To Apply It ?

301 redirect

301 Redirect and how to implement 301 redirect? The question which is asked frequently by every newbie in the field of blogging. There is always a confusion related to the redirection by 301 redirect and 302 redirect.

Today I am going to explain what does 301 redirect mean? What is the difference between 301 redirect and 302 redirect?
For every blogger when the point comes about changes the domain name, adding a new page to the website, changing permalink structure, making search engine direction that the website with no ‘www’ and with ‘www’ both are same.

For What 301 Redirect Is used ?

As I have mentioned above about the use of 301 redirect. When a new page is added to the website then it is required to redirect that page tp the website using this redirection. When a blogger changes the permalink pattern of any post then it is necessary to make the search engine aware of the change which is done by

When a blogger changes the permalink pattern of any post then it is necessary to make the search engine aware of the change which is done by 301 redirect. We all know that whenever we open a website then mostly we type the website name without ‘www’. Suppose you want to open ‘www.yoursite.com’ then you mostly type ‘yoursite.com’ to open the website.

We all know that whenever we open a website then mostly we type the website name without ‘www’. Suppose you want to open ‘www.yoursite.com’ then you mostly type ‘yoursite.com’ to open the website.

But search engine considers both the URL as the different website. To get rid of this problem 301 redirect has invented. You can redirect your website with non ‘www’ to ‘www’. After redirecting this you have told search engines that “yoursite.com’ and ‘www.yoursite.com’ both are the same website. Whenever someone

After redirecting this you have told search engines that “yoursite.com’ and ‘www.yoursite.com’ both are the same website. Whenever someone types ‘yoursite.com’ to open your website he/she will automatically redirect to the main website.

Difference Between 301 Redirect And 302 Redirect :

Both the redirect are somehow similar to each other we can say one is the part of another. 301 Redirect is used when a page, a domain or any stuff I have pointed above need to redirect permanently. But for temporary

But for temporary redirects we need to use 302 redirect. Somehow we can say that 302 redirect is the part of 301 redirect. Both are used for redirect but one is for permanent redirect and another is for temporary redirect.

How To Implement 301 Redirect for different forms ?

There are many different places for which we do 301 redirect. There are some which I am going to explain. For every redirect you need to copy the codes at the top of your .htaccess file in your root directory which can be opened by logging to the cPanel of your web host from which you control your website.

Go to file section and open file manager. Note ( .htaccess is a hidden file so it is necessary to check on show hidden files when you open file manager. You will find the file named .htaccess there in which you have to add 301 redirect code.

how to do 301 redirect

  • When You Move A New Page To PHP

   <?
           Header( “HTTP/1.1 301 Moved Permanently” ); 
           Header( “Location: http://www.yoursite.com” ); 
           ?> 

You just have to add this code when you add a new page to your WordPress website.

  • When You Change Permalink Structure

1. There are two steps to redirect it one is by editing .htaccess file and another is by using a plugin. I would like to tell you using .htaccess file. There are some simple steps required.

There are many ways but you can do it by visiting here and at downward of this page you will come to see a colored box in which you will see that ‘Generate Redirects‘ is written. You have to click at this box and a new window will appear in front of you. Fill all the columns and you will be provided a code.

how to implement 301 redirect

2.Copy this code to your .htaccess file.

3.Now you can change your permalink structure by visiting WordPress dashboard.

4.You can your permalink from http://www.yoursite.com/date/post name/ to http://www.yoursite.com/post name/ if you want to appear it followed with only your post name instead of both date and post name.

5.Try to open your old link and if have done correctly then your old permalink will get redirected to new one. It can be  checked by using redirect checkers. You can try 301 redirect checker.

  • 301 Redirect From Non-WWW To WWW

It is also the same. You need to open your file manager in which you will find the file named .htaccess. You have to paste the code written below to the top of .htaccess file.

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

  • Domain Redirect

Suppose you have your domain name ‘www.yoursite.com’ and you wants to redirect it to a new domain ‘www.yourblog.com’ then you can easily do it with 301 redirect. After redirect when someone types your old URL the visitor will automatically redirected to your new domain.

301 Is SEO Friendly :

You have heard it correct about 301 redirect. As you, all know about SEO. Inbound links matter a lot for the SEO of a website. Suppose you have 300 links to your old domain and you haven’t redirected to your new domain then your all links will not be considered.

It is necessary to do 301 redirect if you want to keep all inbound links safe. For every blogger getting traffic to their blog is a major concern. When bloggers haven’t redirected their old domain to their new domain then when visitors will not visit your blog.

Whenever they enter the URL of your old domain they will get 404 error and you will lose your old visitors. To avoid this problem you have to do 301 redirect.

Final Conclusion About 301 Redirect :

It is necessary to know about this redirect stuff for every blogger. Because in the upcoming time new bloggers will have to use 301 redirect for redirecting their old page to new page, their old domain to new domain and more.

There shouldn’t be a doubt when a blogger come across doing redirection. If you have something to ask then I would like to hear in the comment section.

by Ravi Chahar

A blogger, web developer, and designer who intend to guide his readers about WordPress, Blogging, Web Development, Web Design and more. I have expertise in WordPress theme development and customization. I can set up and redesign the Thesis themes. I have been working in this field for years now.

4 comments

  1. Hey Ravi,

    I know that a lot of these types of notices are confusing for many. I’ve never changed my permalinks so this isn’t something I’ve ever had to do. I’ve been told a few times how to though should that ever happen but I certainly don’t see that taking place at this late stage of my blogging career.

    I appreciate you walking us through how this is done though, thank you.

    ~Adrienne

    1. Hi Adrienne,
      For every blogger is is really important to know about 301 redirect. May be you haven’t change your permalinks but if you do then keep in mind about this redirect to be safe. As I have explained what it the use of 301 redirect and why? In the starting phase of a blogger he/she seek for these small thinks to do but sometimes a famous blog also fails to provide it by taking it a normal stuff to write about.
      Thanks for your consideration.

    1. Hey suryateja,

      Welcome to BloggingLove.:)
      I am glad to know that the tutorial was helpful and you have solved your problem. You know many times if you don’t do redirect then you will see the broken page or any error. So its better to do 301 redirect.
      Thanks for your visit.
      Enjoy your stay.
      ~Ravi

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge