devil

What is 301 Redirect And How To Apply It?

301 Redirect and how to 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 non ‘www’ and with ‘www’ both are same. 



[caption id="" align="aligncenter" width="600"]What is 301 Redirect And How To Apply It? What is 301 Redirect And How To Apply It?[/caption]



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 with the website using this redirection. When a blogger changes the permalink pattern of any post then it is necessary to make search engine aware about 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. But search engine consider both the URL as 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 same website. Whenever someone type ‘yoursite.com’ to open your website he/she will automatically redirected 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 redirect 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 in 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 plugin. I would like to tell you using .htaccess file. There are some simple steps required. There are many ways to 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 to WordPress dashboar



 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 try301 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 type 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 the major concern. When bloggers haven’t redirected their old domain to their new domain then when visitors will not visit to 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 many more. There shouldn’t be an doubt when a blogger come across doing redirection. If you have something to ask then I would like to hear in comment section.



ADVERTISEMENT
Subscribe to this Blog via Email :

Would love to here from you...