If you are going to move webpages get it right with 301 redirect

Why having A 301 Redirect is Important When Moving Webpages

Error 301 with Digital java code text. Error 301 and Computer software coding vector concept. Programming coding script java, digital program code with Error 301 on screen illustration

A client of ours (who we can not name but who are a large multi national organisation within a specific niche) recently redeveloped their website. We informed them that they would need to ensure that all the URLS for the pages remained the same otherwise they would lose all the link power we had created (Client was on page one for everyone of their keywords) We also advised them that we would need to oversee this to ensure the 301 redirect for each page was set up.

Now did the client take any notice?

Sadly not

We noticed when we came into the office one Monday that the client had set up their new website and set up new pages, resulting in all the links we had done over the past two years, to disappear. How did we now this? They went from being on page one for all of their keywords to disappearing completely from Google rankings. The reason why they disappeared was when then they set up their new pages, they didn’t do a 301 redirect for their old pages.

What The lack of a 301 redirect can do

 

Look at the picture to the side. What you see is just a small example of our clients pages no longer being indexed within Google, because they didn’t put in place a 301 redirect. You see the URL of the page and the crawl result – on this small example 5 of the 7 visible results all have 404 errors because of no 301 redirect.

Because this site did not have a 301 redirect set up on each page they wanted to move, as I mentioned not only did the links we make drop off, but the page is seen by Google as a 404 error (doesn’t exist). Now out of the 2500 pages that we analysed 1243 pages have errors and with this many page errors the website has naturally dropped completely from all of its rankings. Which in turn has resulted in a massive drop in visitors to the site, all because a simple 301 redirect was not added.

So how easy is it to add a 301 redirect? Very – let me show you. But first let me explain when best to use a 301 redirect

When to use a 301 Redirect

A 301 redirect is a permanent move of a page and should not be confused with a 302 redirect which is temporary. If you implement a 301 redirect for a temporary move, and keep doing this on a regular basis, Google will more than likely penalise your site. So before you put in place any type of page redirect, decide from the outset is it to be a 301 redirect which is permanent or a 302 redirect which is temporary?

So to summarise the point: a 301 redirect takes all traffic and links arriving at your old page and redirects them to the new page; your links are safe, your PageRank is safe and your visitors still get to where they need to be.

How to carry out a 301 redirect

Using .htaccess method

A 301 Redirect can be created in a number of different ways; one of the best  is to use your websites .htaccess file (this is if you’re using an Apache server, which more than likely you will be – your web builder will know.)

The first step is to create your new page!

Once you have done that open (or create, if it doesn’t exist) the .htaccess file in the same directory as your page, and paste the following code:

Redirect 301 /my-page.php http://www.example.com/new-page.php

Next you save it, then upload it and your permanent 301 redirect will be in place! This method is probably one of the most powerful ways because you can redirect entire folders/directories, or even entire websites with it.

 The PHP method

If you’re not sure how to edit your .htaccess file then there is another way -you can use a PHP file. (if you dont know what code your site is in, check with your web builder)

Move or delete your old page (e.g. rename ‘my-page.php’ to ‘my-page-old.php’), create a new page with the same name (i.e. create a new page called ‘my-page.php’) and paste in the following code:

<?php
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.example.com/new-page.php" );
?>

Then when you save the  new page, you have to make sure that it is saved as a .php page otherwise it wont open. Additionally make sure you don’t have an .html version either otherwise your website may override the PHP version and use the .html version which wont be set up properly.

Once you’ve done that, upload the page, and the redirect in place!

Note that this second way only redirects one page, and only works on php pages. (If you need to put in place a 301 redirect for multiple pages you have to replace each page you want to redirect)

A 301 redirect is that easy!

Putting in place a 301 redirect is that easy, especially the first method. If only our client asked us before they got on with transferring their new site, they wouldn’t have lost all their rankings, they wouldn’t have lost all their traffic, they wouldn’t have all these 404 errors and they certainly wouldn’t be panicking because they are loosing revenue.

So if you want to permanently move a page on your site, make sure you use a 301 redirect because its the only way.