Rose DesRochers – World Outside my Window

World Outside My Window is a blog about, controversial topics, current events, daily life, and the world as I see it.
Rose DesRochers – World Outside my Window


How to setup a 301 Redirect in WordPress

January 26th, 2010 by Rose DesRochers · 2 Comments

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.

If you liked this post, why not buy me a coffee?

Rose DesRochers

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

Tags: Blogging Tips
del.icio.us:How to setup a 301 Redirect in Wordpress  digg:How to setup a 301 Redirect in Wordpress  wists:How to setup a 301 Redirect in Wordpress  simpy:How to setup a 301 Redirect in Wordpress  blinklist:How to setup a 301 Redirect in Wordpress  reddit:How to setup a 301 Redirect in Wordpress  fark:How to setup a 301 Redirect in Wordpress  blogmarks:How to setup a 301 Redirect in Wordpress  Y!:How to setup a 301 Redirect in Wordpress  magnolia:How to setup a 301 Redirect in Wordpress  stumbleupon:How to setup a 301 Redirect in Wordpress

Related Post:
-WordPress Security Update
-How to redirect from Blogger- Html Redirect
-WordPress 2.0.7 Released – Security Holes
-WordPress 2.7 and my Cutline theme
-Top WordPress Plugins

If you found this page useful, consider linking to it.
Simply copy and paste the code below into your web site (Ctrl+C to copy)
It will look like this: How to setup a 301 Redirect in WordPress




Leave A Comment

CommentLuv Enabled

2 responses so far ↓

  • Steve Youngs
    Wrote: Jan 26, 2010 at 6:43 pm

    Surprisingly simple. Thanks, Rose!
    Steve Youngs´s last blog..Anatomy Of A Goal My ComLuv Profile

    ReplyReply
  • Sire
    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 My ComLuv Profile

    ReplyReply