Products not visible on website now producing a 404 error


https://forum.kartris.com/Topic2302.aspx
Print Topic | Close Window

By thopcroft - Sat 10 Aug 2013
In the previous version we were using, when a product was not visible on the website Kartris redirected to a landing page within the store informing the customer that the product had moved - thus avoiding a 404 error. We are now using the latest version and have noticed that these products are generating a 404 error. The only way we can avoid this is to set the product as visible on the site, and hide the version. This results in the product displaying the "this product has moved" message on the product page.

This is a bit messy because we have to keep obsolete products visible to customers and presumably they are also going to be included in the sitemap. Is there another way we should be dealing with products we no longer want on the website.
By Paul - Tue 13 Aug 2013
We changed this functionality largely because a request for a product that no longer exists should really be treated as a 404 and sent a 404 Not Found header. Otherwise search engines will continue to think the item exists. They can get a bit annoyed if you return 200 OK for all pages, even ones for items that don't exist.

It's possible to change the 404 page to something a little less intimidating by editing the HTML if you like. But we'd recommend keeping it self contained without referencing other files on the site (e.g. images). Firstly, because sites can generate a lot of 404s if there are old or bad links out there in the wild, so it saves bandwidth. And more importantly, if you reference other files, then if they for some reason get deleted or renamed, you can get into a situation where your 404 page itself calls pages that don't exist and you get a chain reaction of 404s within 404s that in theory won't stop (although browsers generally do seem to cut it off).