[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2012-03-10
5
Medium Priority
?
350 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 320 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 51

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 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 320 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 320 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

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A big percent of today’s marketing activity is performed through the online environment. The marketing strategies that have existed a decade ago no longer relate to what’s happening today. We’re currently facing a revolutionary era, called the digit…
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
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 how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

873 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