Posts may or may not contain affiliate links. If an article contains affiliate links and you click them I will receive a small commission.

Simple Solution on How To Redirect 404 Error

For some reason when Google crawls my site it is adding /contact-me at the end of most my urls. After checking in with Google webmaster tools, I learned that I had 390, 404 not found pages! Wow that is a lot, so I started looking at the crawl errors, found out for some reason my site map via Google had not been updated since October of 2010, why I have no clue, so I went ahead and did a force update, now I am waiting on Google to do another crawl. I was still kinda bummed about all these 404 page not found, so I used Google like I always do when I have a problem.

I searched “how to set up a wordpress redirect of 404 page to home page” got a lot of hits, tried several different things, including editing my .htaccess file, nothing worked then I came across this message board, read through it and a guy gave the perfect fix!

I recommend you first make a back-up of the file only because it is the smart thing to do. Go into your theme, and under Editor, you will find a file called 404.php this file tells your blog what it should do when it comes across a page that doesn’t exist, you want to remove all that code, then add the code below.

<?php //Simple Redirect for WordPress. //Christopher Carey //301 Redirect for WordPress // header("HTTP/1.1 301 Moved Permanently"); header("Location: ".get_bloginfo('url')); exit(); ?>

Save the file, then goto a page that doesn’t exist and bam it should take you back to your home page! Hopefully when Google comes and crawls my site again all my 404 Not Founds will be gone!

Get Real and Stop Dieting by Brett Blumenthal Review
Food Journal
About Jammie Morey

Jammie is of Native American descent, she has family from the Ojibway/Chippewa tribe in Mount Pleasant, Michigan. She was born and raised in Michigan, where she later moved to Tennessee with her husband and daughter. Jammie and her husband home school their daughter, and enjoy doing many things together as a family. Some of those activities include geocaching, hiking, fishing, playing games together as a family, and just being silly with their daughter. Jammie is Owner of The Neat Things in Life. For more information visit on Google+.


  1. Thanks for the walk through…I think I got it fixed…Hopefully I’ll see something new going on here soon.


    Jammie Reply:

    your welcome. I think you can change the ‘url’ to a different page and redirect them to another page, but I have not tested that.


Speak Your Mind


The Neat Things in Life is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to