Solved

Are URL redirects the best way to deal with Google and moved pages?

Posted on 2012-03-10
5
341 Views
Last Modified: 2013-11-19
We migrated our site from straight-up file-based system to Drupal.  Unfortunately, many links in Google point to our old site.  If I search for Murray Richtel, for example, I get a hit for this address (the old URL).

http://www.jaginc.com/pages/richtel.php

Murray now lives here:

http://jaginc.com/arbiters/mrichtel

This issue exists for many of the pages in the site.  Do we handle the issue with simple URL redirects?
0
Comment
Question by:jdana
5 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 80 total points
ID: 37706332
I am not THE expert on this. I can however confirm that 301 from .htaccess worked well for me. If you have many pages, you may want to add a process that takes all /pages and looks up the new address and send back the 301 for you.
0
 
LVL 50

Expert Comment

by:Steve Bink
ID: 37706433
I agree with mplungian.  Google needs to be told where those pages go, or you'll lose their rank altogether.  A 301 is the appropriate way to do this, and Google handles them internally.
0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 80 total points
ID: 37706735
If your old site can access PHP you can build translation tables.  Just call this in a common page header algorithm right at the top of the script, before any browser output.  Obviously this is untested code, but hopefully it will demonstrate the idea.

Example:
<?php // TRANSLATE URLS

$urls = array
( '/pages/richtel.php'  => '/arbiters/mrichtel'
, '/pages/barr.php'     => '/arbiters/rbarr'
, '/pages/anderson.php' => '/arbiters/landerson'
)
;

// TEST FOR THE OLD URL
if (array_key_exists($_SERVER["PHP_SELF"], $urls))
{
    header("Location: $urls[{$_SERVER["PHP_SELF"]}", TRUE, 301);
    exit;
}

Open in new window

0
 
LVL 12

Assisted Solution

by:junipllc
junipllc earned 80 total points
ID: 37707074
You can also use the Apache "Redirect" method. I'm mobile right now but I think the syntax is:
Redirect permanent http://url1.example.com http://url2.example.com

sorry for the horrendous formatting. my phone and i are having  a fight and it's winning

mike
0
 

Author Closing Comment

by:jdana
ID: 37779402
Great suggestions.  Thanks!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Read about how to choose the best possible content marketing agency to suit your needs. Content marketing has become an integral part of running a successful tech business, so it is wise to be informed.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now