Expired items should return 404 HTTP error code
I have a suggestion for PP Classifieds. Currently, when an item is expired and removed from the db, it shows this message: Product ID is no longer in our database. If you were trying to renew an ad, you will need to resubmit.. It only makes sense that when an item expires it produces the message.
The only downside to that is that Google indexes that expired page and may or may not eventually remove it from their index. The reason being is that Google has previously indexed the page when it had a product on it, now the content has changed (expired).
Specifically, the issue here is that search engines still index the page because it's returning a 200 OK HTTP status code. Since the product is no longer in the db it yields the same page (i.e. duplicate content) for multiple pages when it really should send a 404 Not Found HTTP status code because technically that page (product) no longer exists, and will never exist again.
I don't know exactly how to implement this, I may look into it myself if you guys can't implement this soon.
I know you can send 404 HTTP headers in php using code such as this [source link]:
The result is better (cleaner, more relevant) search indexes by the search engines and better search results for end users (because they won't see those pages listed in search engine results anymore). A win-win situation.
Please consider this for a future release. Like I said when I get time I may poke around and see if it's possible but you guys probably have a better idea of what templates, php files, etc. to edit to make this magic happen. Heck, even if you tell me what files I should edit I can look around myself. Just trying to help!
OK, in case anyone else here cares about this topic, here's the fix. Open showproduct.php, from lines 135 on you'll see this:
Hi Chuck, I just wanted to bump this. Can you please discuss this with Michael next time Classifieds is up for discussion. I have been running this code change with *great* results. It would be nice to see this in version 3.05. Thanks!
Michael does not code Classifieds I do.
I am not sure why you would want to send an http 404 statement. I know what your saying about some google thing but lets break this down. Take vbulletin which is probally the biggest product out there. I do not believe they issue specific http 404 pages for when a thread is deleted. Same thing they issue a statement in their program much the way we do that says thread/product not found.
More on this 404's are used for when a file is not found. Our file is indeed found as its showproduct.php
I would have to investigate the pros cons etc of doing such a move since all 404 is discussion is placed upon the actual filename not variances of php variables used by the script.
I'm talking about URL's not files. Google indexes URL's. I'm not very familiar with vb, I don't know how they handle deleted threads.
In doing some research I discovered the status code should be 410 Gone, NOT 404 Not Found as I previously mentioned. The code would then look like this:
OK, so the red widget sold today. Great, so the seller updates/deletes the ad, and in a few days when you go to that URL, you're presented with this message: "Product ID is no longer in our database. If you were trying to renew an ad, you will need to resubmit.". Sounds good, right? Well it is and it isn't.
Now Google will visit that page again (because red widgets are still in their index). When they crawl that page, they get a 200 OK http status code which means everything is A-OK. But they'll notice there is new text there now, so they know the URL is good but they don't really know the product is actually gone. Now remember when a product is gone, that URL (showproduct.php?product=1) will never be used again, it's going to produce the "Product ID is no longer..." message forever ;-) However, as far as Google is concerned, that URL still exists, it just has new text on it. So it indexes the page that used to be about red widgets, now it has to figure out what is the page about because it must be about product ids and databases, so it has to "think" about the page and figure out how/where to rank that page now...
Then think.... take that "Product ID is no longer..." page, multiply it by a few dozen (maybe more) for each PhotoPost Classifieds installation. Then multiply 25 by the hundreds of sites running PP Classifieds and you can see how there will be a lot of red widget pages being indexed by Google that shouldn't be. Sure, Google can write algorithms to "deal" with this, but the correct way to handle it IMHO is to serve a 410 Gone header code.
It makes sense to serve a 410 http status code because as soon as Google comes by the red widget page, it knows that that URL is permanently gone. They will stop crawling the page and won't send visitors to that page anymore. And there's no need to, the product is sold/deleted/gone and even if someone uploads a red widget again, it won't be at the URL showproduct.php?product=1 ever again.
So think of it this way. It's not sending an "error" for the script showphoto.php, it's sending a 410 Gone "error" for the product URL (showphoto.php?product=1).
As per Google - HTTP status codes - Webmasters/Site owners Help - a 404 code means"Not Found". Well that's not quite true in this scenario.... it did find a page (one with a message saying product not found) which is a valid web page, so it should return a 410 "Gone" response. This is a quote from Google on what a 410 code is:
So to summarize, by adding the 410 http status code to expired/deleted product pages:
- Search engines know that page is gone and therefore will stop indexing that specific product page right away (less bandwidth for the site owner, more accurate crawling for Googlebot)
- Search engines will stop sending traffic to a product page that's gone (good for visitors coming to the site, greater chance of finding what they want in the search results)
- Easy to implement, I've already proven it works quite simply with just one extra line of code (OK, change my earlier line of code from 404 to 410 if you technically want to be correct).
- The Google search results for red widgets will be more accurate because the product page that is gone is removed from the index quickly (not misleading people who are searching)
- None ;-)
I have had that 404 code up on my site now since last October. I did a search for "Product ID is no longer in our database..." and Google has correctly de-indexed all the expired ads on my site. I wish I had calculated the "before" part of this. I can't remember how many results it found before for the same query on my site.
I hope that helps explain my position. Now, let me just add that I don't think this is some critical thing missing, I consider this a "nice-to-have" type thing that is "the best way to do it" in *my* opinion. Others may not agree, I realize that. Let me know if you have any more questions or comments. Whew, this became a long-winded response. Hopefully I've helped a little bit ;-)
Oh, and here's an example of a 410 Gone page from my classifieds:
and a good 200 OK page from my classifieds:
2003 F-150 Blue Supercab FX4 - Ford F150 Classifieds
Notice the user doesn't even know what a 410 is (there's no indication to them, which is good) but check the status codes on the two pages here:
Check Server Headers Tool - HTTP Status Codes Checker
As I said, I'm not considering this a "bug", more of a "suggestion", that's why it's in the suggestion forum.
I will have to do alot of reading before I change anything.
|All times are GMT -5. The time now is 11:46 AM.|
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0