#1
  1. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Dec 2011
    Posts
    3
    Rep Power
    0

    Should I issue a 302 redirect to an error page when handling a 500 error?


    Say the server for a given Web site handles a request for particular page on that site, but an error occurs while that request is being processed. (For example, there could be a temporary problem with the Web site's database.) In this situation I need to display an error page that has an HTTP status code of 500 (Internal Server Error). My question is: from an SEO perspective, is it better to write this error page as the response for the failed request or is it better to issue a 302 redirect to the error page?
  2. #2
  3. SEO Consultant
    SEO Chat Genius (4000 - 4499 posts)

    Join Date
    Jul 2004
    Location
    Minneapolis, MN, USA
    Posts
    4,265
    Rep Power
    1138
    I guess to a large extent the answer to this really depends on your site structure and server set up.

    What types of requests and errors are you expecting and how often or are you expecting these to occur, say as a percentage of total requests.

    On the face of things it makes sense not to mess with the error codes that should be served. I do wonder if it is possible to offer some type of custom content rich error page with a 200 status code, but I would need to know a lot more about your site and requirements before offering up that advice.

    I don't think adding 302s as error pages is a good idea. This would definitely fall under that radar of trying to trick a search engine, and those are usually things to steer clear of.
  4. #3
  5. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Dec 2011
    Posts
    3
    Rep Power
    0
    Thank you for your response.

    I would be hoping that I would never get internal server errors, but software development being what it is, that is an impossible goal.

    To clarify, my interest in this question is as a Web developer. If an error occurs, the Web frameworks I use by default return an error page as the response to the failed request, so the client does not see the URL change. But I saw the following advice on a recent blog post and I am after some opinions as to whether it is correct:

    "In a regular application (aka not a RESTful web service), the proper way to handle a 500 error is to issue a 302 temporary redirect, then redirect to the 500 error page that returns a proper 500 status code.

    For a server to issue a 500 error directly without redirect can cause your server to be deindexed from search engines as it appears to be a globally bad server. It responds to a regular request with a 500. When it responds with a 302, then a 500, search indexes see that currently something is wrong with X url, but later it should be available. Responding directly with a 500 is saying this url will NEVER work." (dotnetchris)
  6. #4
  7. SEO Consultant
    SEO Chat Genius (4000 - 4499 posts)

    Join Date
    Jul 2004
    Location
    Minneapolis, MN, USA
    Posts
    4,265
    Rep Power
    1138
    OK I see.

    I like the phrase a software developer said to me once when we were debugging a program -

    ME: "When will it be fully debugged"
    Software guy: "Software is never fully debugged, just the mean time to failure increases"

    And I think that is so true!

    You probably need to do nothing.

    I do see the point of the blog post but I would not recommend doing multiple redirects in case of a 500 error. 500 errors should be addressed. It is far more common for search engines to find 404 errors.
  8. #5
  9. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Dec 2011
    Posts
    3
    Rep Power
    0
    It's very true :-)

    Certainly all the 500 error pages I can recall seeing on other sites are shown with no redirect.

    Looking at that advice I quoted, I find it hard to believe that any search engine would take the draconian step of deindexing the page straightaway (or indeed deindexing the whole site if the error is affecting all pages). Surely this would only happen if the error response was returned consistently over a considerable period of time? (And in theory such a situation would never arise as the errors would get dealt with.)
  10. #6
  11. SEO Consultant
    SEO Chat Genius (4000 - 4499 posts)

    Join Date
    Jul 2004
    Location
    Minneapolis, MN, USA
    Posts
    4,265
    Rep Power
    1138
    You are absolutely correct in your assumption.

    An entire site being down for a short period will not cause an issue, even if Googlebot comes to visit during that time.

    A consistently down or slow site will cause a devaluing and a drop in rankings.

    It is unlikely that a site would be entirely de-indexed just due to a page error.
  12. #7
  13. Contributing User
    SEO Chat Super Genius (4500 - 4999 posts)

    Join Date
    May 2007
    Posts
    4,515
    Rep Power
    1985
    Originally Posted by tstolber
    I don't think adding 302s as error pages is a good idea. This would definitely fall under that radar of trying to trick a search engine, and those are usually things to steer clear of.
    Just as an aside - why would you think that's a bad idea?

    It's a temporary problem and you're offering up a temporary redirect.

    After all, isn't that what 302's actually meant for - temporary redirects?
  14. #8
  15. SEO Consultant
    SEO Chat Genius (4000 - 4499 posts)

    Join Date
    Jul 2004
    Location
    Minneapolis, MN, USA
    Posts
    4,265
    Rep Power
    1138
    After all, isn't that what 302's actually meant for - temporary redirects?
    Yep, nothing wrong with a single 302 when content has temporarily moved. I don't feel that an error page meets those criteria, as the content hasn't temporarily moved - its temporarily unavailable - hence an error page is appropriate.

    Just as an aside - why would you think that's a bad idea?
    In general I don't think it is a bad idea to use a 302 where appropriate (as there are some circumstances that make sense) but the OP was asking about serving a redirect and then an error page so his initial URL would not get flagged up as an error, only the actual final landing page which would be one single URL would actually return the error.

    It is advisable not to use multiple response codes for a request to a single URL. Multiple redirects and response codes are something that could easily be determined as trying to trick a search engine and serve up different content to different users. To me this is a red flag and I would not advise it in the scenario as discussed by the OP.

    Comments on this post

    • jsteele823 agrees : ;)
  16. #9
  17. Contributing User
    SEO Chat Super Genius (4500 - 4999 posts)

    Join Date
    May 2007
    Posts
    4,515
    Rep Power
    1985
    Not to mention the failure in the logic of the quoted source.....

    A page goes down. If you do nothing, it gets penalized.
    But hey, if you redirect it to this other page that is also down, you'll be fine.

    Seems broken to me

    Side note - don't 302 your 404 error pages either.
  18. #10
  19. No Profile Picture
    Contributing User
    SEO Chat Skiller (1500 - 1999 posts)

    Join Date
    Jan 2008
    Posts
    1,834
    Rep Power
    426
    Get some prevention methods in place. Keep database backups. If you're a coding ninja, have a test server clone before you put anything live.

Similar Threads

  1. Redirect error (URL not followed)
    By Andy_dg in forum Google Optimization
    Replies: 2
    Last Post: Apr 16th, 2007, 05:14 PM
  2. Redirect error (Google webmaster tools)
    By Mesa in forum Google Optimization
    Replies: 0
    Last Post: Feb 24th, 2007, 07:55 PM
  3. W3c compliance.
    By lkmbrd in forum Web Design, Coding and Programming
    Replies: 5
    Last Post: Mar 22nd, 2006, 05:56 PM
  4. A possible fix for the Google 302 temp redirect issue?
    By Adrew in forum SEO Help (General Chat)
    Replies: 4
    Last Post: Feb 27th, 2005, 03:21 AM

IMN logo majestic logo threadwatch logo seochat tools logo