In my previous post “Google Webmaster Tools 404 Not Found” I told you that I’d be telling you how to set up a 301 redirect to redirect 404 not found pages to your main page.
How to redirect your WordPress 404 page
From within the WordPress dashboard click on appearance then editor.
Look on the right side for the 404.php file (404 template).
Click on the link and remove all the code in the box replacing it with the following code.
header(“Status: 301 Moved Permanently”);
header(“Location:http://www.ChangeToTheURL.com”);
?>
If you don’t have a 404.php file you can create one by making a text file with the above code in it and saving it as a 404.php then uploading it to your WordPress themes directory.
How to redirect links using a plugin
An alternative to this would be to use the Redirection plugin to redirect your links.
Rose wears many hats. She's a wife, mother, respite worker, proud shih-tzu owner, blogger, published poet, freelance writer, as well as the owner and administrator of Today's Writing Community and Blogger Talk Blog Community. Feel free to contact her with any questions you may have.Rose DesRochers has 1216 post(s) at Rose DesRochers – World Outside My Window

















2 responses so far ↓
Wrote: Jan 26, 2010 at 6:43 pm
Surprisingly simple. Thanks, Rose!
Steve Youngs´s last blog..Anatomy Of A Goal
Wrote: Jan 27, 2010 at 2:05 am
I’ve always used the redirect plugin Rose, but this would prove a good alternative.
Sire´s last blog..Why I Think Rudd Is A Bloody Idiot