How 301 redirect work – Steps to add 301 redirect

by Prashant Ojha Software Trainer

Wondering what is permanent redirection or 301 redirect & how it works? Also looking for steps to add 301 redirect? Today I will show you the use of permanent redirect (301) and steps to add 301 redirect (permanent redirection) to your website or blog. But before that we should know what is 301 redirect later I will explain how it works and it’s benefits in SEO (Search Engine Optimization).

301 Redirect Definition

301 is hyper text transfer protocol (http) response code status. It shows that the destination page (URL) is moved permanently to another location or destination. This is the best practice when you are moving your site from non secure server i.e. http to a secure server https. Both search engines Bing and Google recommend using a 301 redirect to change the URL of a page as it is shown in search engine results, providing that URL will permanently change and is not due to be changed again anytime soon.

Steps to add 301 redirect

You can add permanent redirection by using different methods.  

WordPress redirect by using .htaccess file.

Open/download .htaccess file

# BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ – [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]


# END WordPress

# BEGING 301 Redirects

Redirect 301 /blog-post-1/

# End 301 Redirects

ASP .NET Redirect

<script runat=”server”>

private void Page_Load(object sender, System.EventArgs e)


Response.Status = “301 Moved Permanently”;




ASP Redirect

<%@ Language=VBScript %>


Response.Status=”301 Moved Permanently”

Response.AddHeader “Location”,””


PHP Redirect


Header( “HTTP/1.1 301 Moved Permanently” );

Header( “Location:” );


JSP (Java) Redirect



response.setHeader( “Location”, “” );

response.setHeader( “Connection”, “close” );


CGI PERL Redirect

$q = new CGI;

print $q->redirect(“”);

Ruby on Rails Redirect

def old_action

headers[“Status”] = “301 Moved Permanently”

redirect_to “”


SEO Benefits of using 301 permanent redirection

Major benefit of using 301 redirect is automatically sending website visitors who landed on a 404 (not found) pages straight to 200 (Active) pages. It helps to maintain user experience without even letting user know about it.

It also helps webmasters to reduce the number of 404 (not found)pages in search console and boost website performance.

A301 redirect tells web browsers and search engines that the page is permanently shifted or moved to another location.

Also, it helps in performing better search engine optimization results. It helps in getting more link juice if we are doing it in corrective manner. According to Moz, a 301 redirect “passes between 90-99% of link juice (ranking power) to the redirected page.”

When we require to add 301 redirect?

We all know that we add redirection when we move or shift location of web page or url to another location or destination. Given below are few situations where we can use 301 redirect.

 Updating link structure or slug: If you are running a website which shows as and you want it as then you can use this method on your website. It also goes with your blog posts when you want to update it according to your need. For example, if your blog posts looks like and you wanted to show it as then also you can use this method to create better user experience and can avoid 404 errors.

 Adding Secure Socket Layer to your website: If you have a website or blog which is on non secure server i.e. http and wanted to move it on secure server i.e. https then adding 301 redirect is the best option for you to move site without losing your SEO score in SERP.

Tip: Make sure to add a 301 redirect to send all unsecured traffic to the SSL version of your site.

Upgrading or Changing domain name: If you have plans to upgrade your domain name or change it without losing your rankings in SERP then you can use 301 redirect for this. It will redirect your usual traffic to your new domain without harming your SEO Score.

It is one of the best options to fix index coverage issues in Google search console. I hope now you know all the steps to add 301 redirect and will be able to use it to solve your SEO problem. If you have further suggestions and feedback then do comment below.

Sponsor Ads

About Prashant Ojha Advanced   Software Trainer

40 connections, 2 recommendations, 224 honor points.
Joined APSense since, August 20th, 2018, From New Delhi, India.

Created on Feb 21st 2019 04:56. Viewed 420 times.


No comment, be the first to comment.
Please sign in before you comment.