Submit Your Article Forum Rules

Results 1 to 8 of 8

Thread: 302 Redirect Shows up in log for a 404

  1. #1
    Senior Member
    Join Date
    Jan 2005
    Posts
    991

    302 Redirect Shows up in log for a 404

    Hi all,

    Our web site was developed in ASP.Net, www.cardsdirect.com We had set up custom errors in the web.config and a 404 page to redirect for "Page Not Found" errors. Our main products page uses QString params to identify the actual Product ID. When a product has been discontinued and that page is requested we intentionally throw a 404 web exception from the code such as:

    Code:
    throw new HttpException(404,"Page not found");
    I just released this today and noticed in the log files the httpcode being returned is a 302 for the Page not found 404 error page??? I checked the log files and sure enough there is only 302 and not a 404. I am concerned this is a bad thing since it is my understanding bots, such as Google, do not like the use of temporary 302 redirects. I am assuming the web.config is taking control of the 404 and causing the 302 temporary redirect to the 404 Error Page over IIS. My concern is why wouldnt it return the 404? How will bots evalaute this? We have very good rankings right now and I dont want to see them trashed over this. Just another side note the Error page has "NOINDEX","NOFOLLOW" tags included, if that makes a difference.

    Thanks,
    DMC
    Quality Christmas Gift Baskets for the holiday at TGBP.

  2. #2
    WebProWorld MVP incrediblehelp's Avatar
    Join Date
    Jan 2004
    Posts
    7,567
    Just to understand better, is it your goal to have these old Product ID pages disappear from the search engines index when they are discontinued or to keep them and just serve this 404 page?

    If you want to return a 404 error the pages will be removed from the index eventually.

    With the 301/302 redirect they will possible stay indexed.

  3. #3
    Senior Member
    Join Date
    Jan 2005
    Posts
    991
    Quote Originally Posted by incrediblehelp
    Just to understand better, is it your goal to have these old Product ID pages disappear from the search engines index when they are discontinued or to keep them and just serve this 404 page?

    If you want to return a 404 error the pages will be removed from the index eventually.

    With the 301/302 redirect they will possible stay indexed.

    Hi Incredible,

    There is one page which is dynamically driven off the id in the URL. For instance this product is discontinued: http://www.cardsdirect.com/CardDetai...ProductID=2005

    MSNBot attempted to index this page today. Below is part of the log entry:
    Code:
    2005-03-14 16:27:26 GET /CardDetailEx.aspx Pro__ProductID=2005 80 - 207.46.98.132 HTTP/1.0 msnbot/1.0+(+http://search.msn.com/msnbot.htm) - - www.cardsdirect.com 302
    Where MSN or other bots get these links is beyond me. I believe most them come from URL's already in our index or irritating SERP scrapers out there.

    I cant remove the page as it is dynamic but from the ID in the URL I do check to see if the product is discontinued or not. If so I throw above mentioned 404 error. It does work correctly by displaying the 404 page but as I mentioned the log file shows a 302 not a 404. I would think this is a bad thing regarding possible punishments from Google and etc for using 302's. I believe it happened to business.com at one point? My understanding is either 404 or 301. Any ideas?

    Thanks DMC
    Quality Christmas Gift Baskets for the holiday at TGBP.

  4. #4
    WebProWorld MVP incrediblehelp's Avatar
    Join Date
    Jan 2004
    Posts
    7,567
    I don't believe a 302 is all that bad. Why do you think a 302 will get you in trouble? My feelings are the only thing that will happen is that the 404 page above will not be ranked and eventually the discontinued product page rankings will also drop off if you continue to use the methods above. If you are ok with that then you should be fine. I would wait for some more feedback from other forum members to be sure.

    In the meantime here is a nice thread about the discussion:

    http://www.webmasterworld.com/forum92/2916.htm

  5. #5
    Senior Member sijpie's Avatar
    Join Date
    Sep 2003
    Posts
    105
    It shouldn't come to much as a surprise that the 302 code is used as you (well the server) is redirecting the page to your 404. Initially it threw me as well, particularly as I wanted to see how many errors I was getting.
    Jaap

    PalmVenue
    Broekhuizen Paintings
    MacSijp

    You've done it all
    You've broken every code (Steve Harley)

  6. #6
    Junior Member
    Join Date
    Sep 2003
    Posts
    2
    Try this in the IIS admin console:

    Home Directory tab
    Application Settings -> click Configuration
    Mappings tab
    Highlight the .aspx extension and click Edit
    Check the box for "Check that file exists"
    Click OK

  7. #7

  8. #8
    Junior Member
    Join Date
    Nov 2005
    Posts
    1

    302->404 is a bad thing

    I'm looking for better ways to catch invalid requests and send them to a custom 404 error page. Using an IIS server, .NET

    yes, I've been using the web.config method. It has two faults:
    1) it only works for .aspx pages
    2) it uses a 302 redirection to go to the error page (I am using "/404.aspx")

    I would prefer a 301 redirection... Or - wouldn't it be nicer if instead the server just served the 404 page with a 404 header, without the silly redirection showing to the client?

Similar Threads

  1. Best TV Shows
    By onlinetvshow in forum The Castle Breakroom (General: Any Topic)
    Replies: 57
    Last Post: 03-21-2013, 08:31 AM
  2. NBC, CBS to offer shows for 99 cents
    By coder in forum The Castle Breakroom (General: Any Topic)
    Replies: 1
    Last Post: 11-09-2005, 12:12 AM
  3. MSN Shows Off New PPC Ad Platform
    By WPW_Feedbot in forum Marketing Strategies Discussion Forum
    Replies: 0
    Last Post: 03-16-2005, 12:30 AM
  4. How Long Before Link Shows?
    By cz in forum Google Discussion Forum
    Replies: 7
    Last Post: 06-07-2004, 06:30 PM
  5. Gmail Account Shows 1,000,000 MB
    By alantownsend in forum Google Discussion Forum
    Replies: 1
    Last Post: 05-19-2004, 12:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •