Wordpress 404 error, fix it with a redirect to your main page
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
It happens to everyone, the Wordpress 404 error. It usually happens to Wordpress users when blogs get moved or corrupted. This little 404 file for Wordpress will use a 301 redirect that redirects your user to your main url. No edits to the code are required simply unzip and drop into your theme’s directory.
| 302 | Moved temporarily (redirect) | 662 | 51.7 % | 1.60 KB |
| 404 | Document Not Found | 592 | 46.2 % | 12.62 MB |
| 206 | Partial Content |
Read more posts by Christopher Carey
- Save Money and the Environment with PrintWhatYouLike - April 9th, 2009
- April fools is over, or is it? - April 8th, 2009
- Internet Online Clock can turn your Wii or iPhone into a Clock - April 8th, 2009
- Google Adsense 1099, how does it affect my taxes? - April 8th, 2009
- Should I add Facebook comments to Noheat? - April 8th, 2009
Comments
5 Responses to “Wordpress 404 error, fix it with a redirect to your main page”
Got something to say?
You must be logged in to post a comment.















I’d be wary of this. It’s good to have the page handled nicely (which WordPress does) but Google’s Webmaster Tools won’t validate sites that don’t throw 404’s. This raises concerns, then, about what the search engine thinks of the sites and what penalties it may impose.
There shouldn’t any issue with this as the 404 can be found, it just redirects to the main page. I run it through google site map and it looked good.
Perfect..just what I was looking for! works like a treat..A thouands Thanks!
This is great. I didn’t realize that each theme had its own 404.php file. Alternatively you could replace:
“Location: “.get_bloginfo(’url’);
with something else:
“Location: “.$new404page;
or even
“Location:http://www.notmyblogurl.com”;
Thanks again for posting this!
Bonjour,
Les erreurs 404 sont en effet très importantes, surtout pour les sites de grands envergures.
Voici une solution qui utiliser le moteur de recherche de Wordpress : http://www.armetiz.info/wordpress-erreur-404/