2

Background:

In my ASP.NET (Episerver) site, I have one product page whose content varies based on the product code parameter: www.mysite.com/product/[productcode]

There aren't multiple physical product pages - just the one that varies based on the productcode parameter. This is what I mean by "dynamic".

If the entered product code is not found in the database, the above url returns a 404 page (with a 404 status code in the header).

We never link internally to expired products, but it's possible that various affiliate sites link to outdated campaign products.

Question(s):

The 404 page is customizable, and we have taken steps towards making it user-friendly, but the focus of this question is on the status code:

Is it necessary (or encouraged) to return a 404 status code for expired/non-existent products?

Would I be just as well off by redirecting (301) to a "product not found" page, or simply showing the "product not found" content directly on the product page?

Is it errorneous to make a distinction between not found content (e.g. products, campaigns, jobs) vs not found pages?

My own research

My own research suggests that it is preferable to return the 404 status code for expired content:

Google explains that a "soft 404" (i.e. returning 200 OK but with "page not found" content) is bad practice. However, I'm not sure if this applies in my case, since I'm dealing with "content" and not "pages". Is this distinction erroneous?

Google seems to recommend returning 404 page, so the 404 page itself will not show up in search results.

This blog post suggests that soft 404 may be interpreted as a 404 anyway.

However, I've also read a bunch of (less official) blog posts that seem to suggest that the 404 response code is not important, and that the most important thing is to ensure that users do not bounce off the 404 page (and this can be helped by having custom 404 pages).


I've not been able to find a clear answer to my specific situation, so I'm hoping to be pointed in the right direction. I'm tempted to just go with Google's general advice of returning 404 for not found content. I struggle with finding a clear answer

3

I would think you would need to return a 410 status code (gone) because this tells the spiders/clients that it is no longer in existence and remove it from the search engine/client cache.

  • 404 will do the same but 410 is faster and doesn't take several crawls to remove, 410 is also better for UX assuming you message telling user its never going to return. – Simon Hayter Jul 4 '18 at 22:38
  • @SimonHayter I assume that expired products will not return, but I cannot make a safe assumption (codes may be reused for all I know). If the product appears again at a later stage, will Google pick it up again if it has received a 410 from that page in the past? – lcaaroe Jul 5 '18 at 9:37
  • 1
    If the products might return in the future you should stick to 404, and what you're currently doing (as described in your question) is the correct approach. – Tim Fountain Jul 6 '18 at 13:32
  • expired product is an expired product. And the 410 is a delete, if the product page comes back, its not going to return 410, but index it again in the search engine as an added page. – drtechno Jul 6 '18 at 16:00
-1

I recommend you to choose one of the solution from below:

  1. Keep the old product pages with information that product is no longer for sale (with HTTP status 200). Many big brands are using this method.
  2. Redirect each of non existed product to the most similar/alternative product using 301 redirect. It's better than serving 404 or 410, because this kind of redirect will also pass the link juice from external backlinks and also if the product is back then you can simply remove the redirection and display the native product back again. Remember that redirecting product to homepage can be considered as soft 404 - that's why it's best to redirect to the most relevant/similar product.

Having a lot of 404 errors is not good for both user experience and Google (Search Console is reporting 404 errors). You might lose the trust for the URL if you will temporary serve 404 or 410 and then change it back to 200.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.