How to Redirect Wordpress 404 Page to Wherever You Want

Posted by | online marketing | Sunday 14 February 2010 1:43 am

I have done many mistakes online. I set up many links that doesn’t work. I change a lot of things on my sites. As a result, sometimes the activities that I have done for a long time lead my visitors to the 404 error page because of the changes. Since mostly, I use Wordpress blog for almost all of my sites, I will need to learn how to redirect Wordpress 404 page. With the redirect, my visitors do not have to face a blank 404 page but the page I want them to see.
Again I will have to do some research, I did figure out how to do it. Here are the steps that I did:
1 Test your site first. This can be easily done by typing the non-existing URL on your browser. For example, you can type yoursite.com/xyzabc and then it should lead to a 404 page. See what is shown.
2 Go to your wp-admin and log into the ad min area.
3 Go to my appearance area. Select the editor line.
4 Within the theme editor. See if you have the file called 404.php. If not, you will need to create one and upload to this area.
5 If you have already got this 404.php file. I believe most of the Wordpress theme have this. Select the file to edit it.
6 On the file editing window. Replace all the code with the following:
Put open angle bracket here?php
header(”Status: 301 Moved Permanently”);
header(”Location:http://thesiteyouwanttoredirect.com”);
?put close angle bracket here.
7 If you do not have this file, just open a notepad. Put the above code on the pad. Then save it as 404.php. Use FTP program to upload it to the theme folder.
The final location should at at your site.com/wp-content/theme/theme-name/404.php.
8 Test the link with the browser to check if everything is OK by doing the same as 1.
Now you have redirected your wordpress 404 page to where ever you want.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • blogmarks
  • LinkaGoGo
  • NewsVine
  • Technorati
  • Twitter
  • Yahoo! Bookmarks

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment