Google's John Mueller responded to a concern in the Reddit forums that when it comes to the Salesforce Commerce Cloud, the only real way to use a 404 page not found, is not to use a 404 but a 410 status code. John Mueller of Google said "404 is fine. 410 is fine," trying to reassure this person that both should be fine and not to be concerned.
Here was the question:
Hi everyone, I have a client on Salesforce Commerce Cloud who were told by their Salesforce rep (I believe) that they can't have a 404 page with a header navigation unless they use a 410 HTTP response. This has lead to them serving a 410 by default when a page is not found.I also found this article quoting a Salesforce integrator with a similar line https://salt.agency/blog/salesforce-commerce-cloud-study/
We would much prefer them to use a 404 as the default "not found" however we would like to keep the header navigation on a 404 page if possible.
I have scoured the dev documentation and can't find a reasonable answer as to why header navigation would not be possible on a 404 page.
Has anyone encountered this problem before? Is it a case that we can have a custom 404 page but no header navigation? If you've seen this before what was your work around?
So you know, Google has said that 410s are more permanent and work faster. Google does not say how often it retries 410 pages but it has to be less frequently than 404 pages. Just a note, Google Search Console has labeled 410s as 404s if that makes you feel any better.
Forum discussion at Reddit.