Alex Rivera | Logout

which is better, a 404 error page or redirecting to the front page

Asked 2010-08-04T16:45:40.330
12

I was under the impression that 404 redirects to the front page is considered bad. all websites should have a 404 page. But at the same time I notice alot of people in forums that want their site to redirect to front page when a 404 is called. which is better. Having a 404 error page or redirecting to the front page

Edit
Report

1 Answer

3

Minimize the 404 errors. If some resource doesn't exist anymore, use 410 Gone. A properly designed site doesn't need to take out of commission URLs. If due to errors in the past you need to, set up a redirect to the new location.

Now the only 404s that should be left are mistakes entering direct address and bad links from outside (and possibly removed resources that can't know/don't want to reveal they existed). Sending a 404 error page is better than a 30x with redirect to the homepage because:

  • It's more robot friendly. The spiders won't cache the resource thinking it's still valid.
  • You can still include a link to the homepage in the 404 error page (in fact, you should).
answered 2010-08-04T16:53:15.070

Your Answer