Results 1 to 15 of 15
  1. #1
    ABW Ambassador kse's Avatar
    Join Date
    November 29th, 2005
    Posts
    2,511
    Question What to do (SEO) when product no longer in database?
    Ok, I have a product page on my site that shows the details of each product found in my database. (Example details.php?ProdID=123456)

    As products become no longer available I remove them from my database. So the problem is that search engines from time to time send traffic to my site looking for that product that is no longer available.

    What I currently do is to post something like “The product you are looking for is no longer available, Please use our menu on the left to find another product”

    So the problem is that Google in Webmaster Tools have flagged all of the pages where the product is no longer available as “Soft 404s errors”

    Since I using the same page for my other remaining products I cannot put a 301 redirect or “NoIndex” in the header because I want search engines to index the products that are available.

    Anyone have any suggestions on how I should handle this. From a SEO point of view??
    MERCHANTS: Start showing your coupons directly on your site, that way your shoppers will stop leaving your site looking for them!! If not then remove your Coupon Box!!

  2. #2
    ...and a Pirate's heart. Convergence's Avatar
    Join Date
    June 24th, 2005
    Posts
    6,918
    Quote Originally Posted by kse View Post
    Ok, I have a product page on my site that shows the details of each product found in my database. (Example details.php?ProdID=123456)

    As products become no longer available I remove them from my database. So the problem is that search engines from time to time send traffic to my site looking for that product that is no longer available.

    What I currently do is to post something like “The product you are looking for is no longer available, Please use our menu on the left to find another product”

    So the problem is that Google in Webmaster Tools have flagged all of the pages where the product is no longer available as “Soft 404s errors”

    Since I using the same page for my other remaining products I cannot put a 301 redirect or “NoIndex” in the header because I want search engines to index the products that are available.

    Anyone have any suggestions on how I should handle this. From a SEO point of view??
    Simply create a redirect in .htaccess just for that URL to a real 404 page that sends back a 404 header. You can have a custom 404 page that displays your site map and/or search box.

    Something like:

    Code:
    RewriteCond %{QUERY_STRinG} ProdID=123456 
    RewriteRule details.php  /404.php [R=301,L]
    Salty kisses, Sandy toes, and a Pirate's heart...

  3. Thanks From:
    kse

  4. #3
    ABW Ambassador kse's Avatar
    Join Date
    November 29th, 2005
    Posts
    2,511
    Thanks for the reply but I do not think that will work for my situation(s) since I will have alot of items that gets removed fom my database. Right now I showing over 500 products that are no longer available and I would have no idea what items gets removed on a weekly basis as merchants removes the items.

    Also some of my sites are in ASP so I would love a solution that would work both in php sites ans well as ASP sites. The site I currently working on fixing is an ASP site.

    But thank you for the suggestion.
    MERCHANTS: Start showing your coupons directly on your site, that way your shoppers will stop leaving your site looking for them!! If not then remove your Coupon Box!!

  5. #4
    ...and a Pirate's heart. Convergence's Avatar
    Join Date
    June 24th, 2005
    Posts
    6,918
    Yikes - yes, beyond what I personally can help you with. Sorry
    Salty kisses, Sandy toes, and a Pirate's heart...

  6. Thanks From:
    kse

  7. #5
    ABW Ambassador
    Join Date
    November 25th, 2005
    Posts
    639
    Sorry, I am going to answer your question with another question because I am not sure if this will work. If your host allows you to create a custom 404 or 410 page, why not test to see if the product exists (server-side) and if not, redirect to the custom 404 page? This way the old (vacant) product url will always land on the proper 404 page.

    Maybe you could redirect and rewrite the html header?

    <?php
    // Permanent redirection
    header("HTTP/1.1 404 Not Found");
    header("Location: http://www.yoursite.com/404.php");
    exit();
    ?>
    When the only tool you have is a hammer - everything looks like a nail.

  8. Thanks From:
    kse

  9. #6
    ABW Ambassador kse's Avatar
    Join Date
    November 29th, 2005
    Posts
    2,511
    Dave Thank you for your reply, I thought about that but but had some concerns about doing that since I did not what google/bing to stop indexing the page details.php all together, I just want them to stop indexing the page details.php?ProdID=123456 and other ?ProdID= versions of the page where the product in no longer available.

    Also would not the command you state above have to go in the <head> section of my page and I do not know the product is not available until I am in the <body> part of my page.

    Not sure if I can read a mysql database in the section above the <head> or in the <head> section. I always done it in the <body> part of my page.
    MERCHANTS: Start showing your coupons directly on your site, that way your shoppers will stop leaving your site looking for them!! If not then remove your Coupon Box!!

  10. #7
    ABW Ambassador
    Join Date
    November 25th, 2005
    Posts
    639
    Quote Originally Posted by kse View Post
    I thought about that but but had some concerns about doing that since I did not what google/bing to stop indexing the page details.php all together, I just want them to stop indexing the page details.php?ProdID=123456 and other ?ProdID= versions of the page where the product in no longer available.
    I am not sure about this - maybe someone else can comment? I think that the search engines know that details.php?ProdID=X will provide different content from details.php?ProdID=Y so if details.php?ProdID=X throws a 404 but details.php?ProdID=Y displays blue widgets, they are treated as different pages.

    I am not sure how you have set up your pages but I was taught that all server-side code should go before your HTML document. So, the first part of your server-side page would test for the product and redirect to the 404 page before any HTML was sent to the browser... (Coding best practise)

    Best of luck!
    Dave
    When the only tool you have is a hammer - everything looks like a nail.

  11. Thanks From:

  12. #8
    ABW Ambassador kse's Avatar
    Join Date
    November 29th, 2005
    Posts
    2,511
    Quote Originally Posted by CanadianDave View Post
    I am not sure how you have set up your pages but I was taught that all server-side code should go before your HTML document. So, the first part of your server-side page would test for the product and redirect to the 404 page before any HTML was sent to the browser...
    I will have to give this a try.........

    Tkanks
    MERCHANTS: Start showing your coupons directly on your site, that way your shoppers will stop leaving your site looking for them!! If not then remove your Coupon Box!!

  13. #9
    The affiliate formerly known as ojmoo
    Join Date
    January 18th, 2005
    Posts
    1,466
    I agree, search engines know that details.php?ProdID=123456 has different content than details.php?ProdID=111111. If you can post “The product you are looking for is no longer available, Please use our menu on the left to find another product” then you can also add
    <meta name="robots" content="noindex" >
    the header if the page doesn't exist anymore. This should solve your problem.
    Expert who says Moo

    a.k.a. OJMOO

    Cow Dance


  14. Thanks From:
    kse

  15. #10
    ABW Ambassador kse's Avatar
    Join Date
    November 29th, 2005
    Posts
    2,511
    Quote Originally Posted by oranges View Post
    I agree, search engines know that details.php?ProdID=123456 has different content than details.php?ProdID=111111. If you can post “The product you are looking for is no longer available, Please use our menu on the left to find another product” then you can also add
    <meta name="robots" content="noindex" >
    the header if the page doesn't exist anymore. This should solve your problem.
    Thank you, I going to try to read my MYSQL database before the <head> as Dave suggested and put in the NOINDEX in the header as you suggest.

    So I have a MYSQL Question:
    If I open and search my MYSQL Database before the <head> can I close the MYSQL connection in the <body> part of the page???
    MERCHANTS: Start showing your coupons directly on your site, that way your shoppers will stop leaving your site looking for them!! If not then remove your Coupon Box!!

  16. #11
    ABW Ambassador
    Join Date
    November 25th, 2005
    Posts
    639
    I would do my work up top and read it into variables and close the db connection before you redirect or populate the HTML.

    You can close it anywhere in the page but you want to make sure that it is definitely going to get closed (if you move off the page).
    When the only tool you have is a hammer - everything looks like a nail.

  17. Thanks From:
    kse

  18. #12
    ABW Ambassador kse's Avatar
    Join Date
    November 29th, 2005
    Posts
    2,511
    Quote Originally Posted by CanadianDave View Post
    I would do my work up top and read it into variables and close the db connection before you redirect or populate the HTML.

    You can close it anywhere in the page but you want to make sure that it is definitely going to get closed (if you move off the page).
    Thanks, Yes reading them into variable would work!!
    MERCHANTS: Start showing your coupons directly on your site, that way your shoppers will stop leaving your site looking for them!! If not then remove your Coupon Box!!

  19. #13
    ABW Ambassador kse's Avatar
    Join Date
    November 29th, 2005
    Posts
    2,511
    I want to thank everyone who posted in this thread. I took the two suggestion from CanadianDave and Oranges and now read my MYSQL before the <head> and I put in the "NOINDEX" if the product is no longer available. Which should address mu problem.

    The fact that I now know I can open the database before the <head> is giving me more ideas (and work!!!) but that great to know that I now have more options!!!

    This is why I love ABW, their are always great people around who do the same thing that I do and are willing to help out a fellow affiliate!!!

    Thank you all
    Kevin....
    MERCHANTS: Start showing your coupons directly on your site, that way your shoppers will stop leaving your site looking for them!! If not then remove your Coupon Box!!

  20. Thanks From:

  21. #14
    ABW Ambassador kse's Avatar
    Join Date
    November 29th, 2005
    Posts
    2,511
    Quote Originally Posted by CanadianDave View Post
    Sorry, I am going to answer your question with another question because I am not sure if this will work. If your host allows you to create a custom 404 or 410 page, why not test to see if the product exists (server-side) and if not, redirect to the custom 404 page? This way the old (vacant) product url will always land on the proper 404 page.

    Maybe you could redirect and rewrite the html header?

    <?php
    // Permanent redirection
    header("HTTP/1.1 404 Not Found");
    header("Location: http://www.yoursite.com/404.php");
    exit();
    ?>


    Can I put the line:

    header("HTTP/1.1 404 Not Found");

    as well as:

    <META NAME="ROBOTS" CONTENT="NOINDEX, FOLLOW">

    in the <head> section of my page when the product is not found??? I still want to display the page when the product is not found.
    MERCHANTS: Start showing your coupons directly on your site, that way your shoppers will stop leaving your site looking for them!! If not then remove your Coupon Box!!

  22. #15
    ABW Ambassador
    Join Date
    November 25th, 2005
    Posts
    639
    Quote Originally Posted by kse View Post
    Can I put the line:

    header("HTTP/1.1 404 Not Found");

    as well as:

    <META NAME="ROBOTS" CONTENT="NOINDEX, FOLLOW">

    in the <head> section of my page when the product is not found??? I still want to display the page when the product is not found.
    KSE,

    Sorry, this is nothing I have ever done before but what you just wrote looks good to me. As long as the header gets rewritten as a 404 (plus the ROBOTS meta tag) and that should tell the crawler that the page is gone and to remove it from the index. I am not sure if this would still be considered a soft 404 though. I doubt it due to the header 404.
    When the only tool you have is a hammer - everything looks like a nail.

  23. Thanks From:
    kse

  24. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Featured: Google Product Search - No Longer Free!
    By isellstuff in forum Search Engine Optimization
    Replies: 59
    Last Post: October 17th, 2012, 03:47 PM
  2. Product Database - Todd
    By Heidi in forum Commission Junction - CJ
    Replies: 4
    Last Post: September 16th, 2002, 08:28 AM

Posting Permissions

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