WordPress SEO – Take your customers where they are trying to go.
When working with an existing website, one needs to be careful to take care of existing pages. It is not enough to redesign a website and update url structure to increase that sites SEO. To often I see sites that have been graphically redesigned, only to leave existing search engine links and customer/prospects bookmarks useless. At the very least these pages need to be caught with a 404 page that indicates that the page you are trying to reach has been moved. But we can do much better!
Depending on the technology you have chosen for your site, this technique will be slightly different, but possible non the less. PHP, .NET, ColdFusion, ... all make it quite easy to handle this exact task. When using wordpress, this task gets even easier. Wordpress already forces all traffic through index.php, and wordpress also already passes all page not found errors to an existing 404.php template. All we need to do is modify the 404.php file that is in our current theme.
Quite simply all we need to do is set up a method of checking the page that the visitor is attempting to access, and then redirect them to the new page that matches the old page. This could be as simple as using a switch statement that sets a destination url.
switch (strtolower($_SERVER['REQUEST_URI'])) {
case 'redirect.html':
$destURL = '/SEO-redirect/';
break;
case 'product1.html':
$destURL = '/moneymaker/product1/';
break;
}
once we have the switch statement set up to handle all of our old pages that no longer exist, all we need to do is now redirect the visitor to the new page
header('HTTP/1.1 301 Moved Permanently');
header('Location: $destURL);
We have now successfully handled preserving old bookmarks and search engine existing links. Something that will make your clients very happy.