#1
  1. Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Apr 2003
    Location
    In the PHP Engine :-)
    Posts
    33
    Rep Power
    16

    404 Redirect Question


    Hi,

    I have just taken over as webmaster of an ecommerce store that has several hundred pages in the search engines for products which no longer exist. At the moment the store uses .htaccess to redirect all 404 pages to a generic search page like so:

    Code:
    ErrorDocument 404 http://www.somedomain.com/404.html
    I have just tested a non existent URL using the Server Headers tool over at seoconsultants.com and it gives the following output:

    #1 Server Response: http://www.somedomain.com/skjgfdskgh.html
    HTTP Status Code: HTTP/1.1 302 Found
    Date: Mon, 08 Jan 2007 07:48:17 GMT
    Server: Apache/2.0.52 (Red Hat)
    Location: http://www.somedomain.com/404.html
    Content-Length: 315
    Connection: close
    Content-Type: text/html; charset=iso-8859-1
    Redirect Target: http://www.somedomain.com/404.html

    #2 Server Response: http://www.somedomain.com/404.html
    HTTP Status Code: HTTP/1.1 200 OK
    Date: Mon, 08 Jan 2007 07:48:17 GMT
    Server: Apache/2.0.52 (Red Hat)
    X-Powered-By: PHP/4.3.9
    Set-Cookie: PHPSESSID=8fdfe96600117da510237510327f0cbe; path=/
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Connection: close
    Content-Type: text/html

    My question is, would it be better to send a 404 header using PHP or leave it as it is with all the old product pages being cached as a "404 sorry, please search" page.
  2. #2
  3. SEO Insultant
    SEO Chat Mastermind (5000+ posts)

    Join Date
    Oct 2005
    Location
    sharing a room with my ego
    Posts
    6,470
    Rep Power
    3421
    Definitely add the 404 header.

    But you can turn the error-catching page into something useful. For example a product search page or a miniature sitemap.

    For the record, I would never use something like
    ErrorDocument 404 http://www.somedomain.com/
    ...which people sometimes do.

    Your setup is a lot safer
    ... Hey you! FREE SEO report card ... I really my hosting company ...
  4. #3
  5. Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Apr 2003
    Location
    In the PHP Engine :-)
    Posts
    33
    Rep Power
    16
    Originally Posted by dzine
    For the record, I would never use something like
    ErrorDocument 404 http://www.somedomain.com/
    ...which people sometimes do.
    Can I ask why? Sorry, it's just that I want to be aware of all the pro's and con's of this before I take any action.
  6. #4
  7. SEO Insultant
    SEO Chat Mastermind (5000+ posts)

    Join Date
    Oct 2005
    Location
    sharing a room with my ego
    Posts
    6,470
    Rep Power
    3421
    Because it will associate your home page with a lot of non-existent documents that SHOULD HAVE coughed up a nice and sweet 404 error (with 404 header) instead.

    I don't even know exactly how this could influence my site's ranking or "reputation", but I don't trust the bots enough to think they know how to handle it. So instead, I have a nice and custom 404 page that is quite clever and nudges people to where I THINK they would like to end up on my site. To the bots, it says: "Sorry, this page is not found". I could even make it a "410" - suggesting that the page is gone and it should be deindexed.

    If I still wanted people to come in via that URL, I would make sure it 301-redirected to one of my other pages instead. If I remove a page from my site, I REALLY don't want it there.

    Hope that clarifies things
  8. #5
  9. Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Apr 2003
    Location
    In the PHP Engine :-)
    Posts
    33
    Rep Power
    16
    Fantastic, thanks that has clarified things for me.

Similar Threads

  1. Redirect and PR question
    By sunandwind in forum Google Optimization
    Replies: 3
    Last Post: Nov 22nd, 2005, 11:40 AM
  2. Another rewrite redirect question :)
    By EarlGrey in forum SEO Help (General Chat)
    Replies: 0
    Last Post: Jun 17th, 2005, 08:25 AM
  3. another redirect question
    By ChillnVilln in forum Google Optimization
    Replies: 5
    Last Post: Aug 27th, 2004, 12:03 PM
  4. Redirect Question
    By ksoper78 in forum Google Optimization
    Replies: 3
    Last Post: Apr 27th, 2003, 04:43 PM

IMN logo majestic logo threadwatch logo seochat tools logo