Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2012-03-10
5
Medium Priority
?
348 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

618 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