How to make your Error 404 Pages Useful
June 16, 2008 · Print This Article
The 404 or Not Found error message is an HTTP standard response code indicating that the client was able to communicate with the server but either the server could not find what was requested, or it was configured not to fulfill the request and not reveal the reason why. 404 errors should not be confused with “server not found” or similar errors, in which a connection to the destination server cannot be made at all. (by Wikipedia)
What do you usually do when you click a URL and encounter a “404 File Not Found” error? If you are like most people, you’ll simply click on the BACK button and try another place. The majority of visitors don’t even know that there are any other alternatives. You thus need to do something so that you do not lose this group of visitors who come to your site by following an old link or by typing your URL incorrectly.
Modifying the error 404 pages by redirect is other way to save keep your visitors. Here’s how to do the redirect on your 404 error pages:
Javascript Redirect
Using the simple redirect javascript code to your desired pages is easy. here’s the code:
<script type="text/javascript"></script>
<!–
window.location = "http://suraja.com/"
//–><a href="http://suraja.com">Click here if you are not redirected</a>
The option : “Click here if you are not redirected” used for visitor that disable javascript on their browser.
PHP Redirect
If your 404 error page is using PHP, then this PHP redirect trick is the most effective way because it can be run on all kind of browser. Here’s the PHP code:
<?php $URL="http://suraja.com"; header ("Location: $URL");
exit(); ?>
.htacess / htaccess.txt Redirect
This is another good way to redirect the 404 error page because it can be also effect the subdomain. Here’s the line that you need to add to your .htacess / htaccess.txt :
Redirect 404 / http://suraja.com/
Where should you redirect your 404 error pages to? You can redirect them to your main website or your registration page (if any), or you could monetize the page by use a pre-direct page that filled with advertising ads.
Popularity: 10%






Comments
Got something to say?