Solved

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

Posted on 2012-03-10
5
346 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 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 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 110

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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

726 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