In my logs for my site i see this Hits by Response Code Code 404 - Not Found 11517 So i was wondering if its possible to create a custom 404 page that will auto redirect to my homepage.
cpanel servers have an icon to customize error pages. Mine are custom, but not redirects, just plenty of info. The question is, should you redirect? I don't know, I'm asking seriously.
I would not recommend redirecting the 404 page. Just make a copy of your home page,save it under a new filename (like 404.html) and customize it with a message for your visitors (Sorry, the page you requested does not exist or is no longer available. Try browsing to the desired topic using the site navigation located blah blah blah...).
I agree with Bernard. I think a visitor would be confused when they clicked on a link to one page and were redirected to another without explanation.
I agree with Bernard and RB, that sounds like a bad idea. Here is some code (javascript) if you really want to do it: <html> <title>CodeAve.com (JavaScript: Redirect)</title> <body bgcolor="#FFFFFF"> <script language="javascript"> <!-- location.replace("http://www.yahoo.com"); --> </script> </body> </html>
I think 404 should redirect, BUT not 30x redirect. 404 should stay for 10 seconds or so, and it should redirect to the home page.
I like the Adobe's Idea placing a search box just incase the user is lost he should search for what he was looking for. take a look: http://www.adobe.com/23.htm
Sorry, that's not what I meant. What I wanted to ask are the followings: q1. Does this comply with Google TOS? q1.2. Does this also comply with Google TOS for AdSense site search?
I guess there is nothing wrong with adding Google site search to your custom 404 page as it is a free search and you are helping your vistor to search your site if the page he is looking for was not found. However the adsense search might be an issue.
Air, the challenge I see with that solution is that the visitor doesn't know what just happened. He/she clicked on a link to one page and ended up at the site map.
Do you know what a user ending at 404 page is exactly looking for? Ok, small change. /404sitemap.php <h1>404 msg some desc Sitemap IMO this is good enough.
SHTML Example: <b>Page Requested Not Found!</b> <br /><br /> [ <!--#echo var="REQUEST_URI" --> ] Some Description Sitemap
Ok, I agree. But this is just one more vote for the same conception. I have in mind service/product/information not url. Custom sitemap is probably the best landing 404 page Of Cource there are a lot of other oprions.