On all of our websites we go to great lengths to ensure every page loads correctly every time, but occasionally some glitches can occur. When it does happen, it is important to retain the confidence of your customers by maintaining the appearance that 'all is well'. One of the best examples of this principle is handling missing pages. Of course the best course of action is to ensure you have correct and valid links throughout your site, and ensure any pages which have moved location have a breadcrumb trail in place, however you cannot guarantee the validity of all incoming links from external websites.
What you can do however is treat the missing page as an opportunity to sell to your customers.
As an example, here is a link to a page that does not exist on our website.
The first thing we do is clearly inform the customer that the page he or she tried to access is not there. We then offer a link to our Sitemap, which contains every page in our website so the customer can quickly and easily get to the page they were looking for.
You can also go a step further to try and guess what the customer may have been looking for and provide some alternatives. In the above example, we look at the page address 'article-on-page-not-found'. We can ascertain that the customer was reading this article previously, so can provide a link for them to get back.
Applying this same principle to an ecommerce store, if the customer arrived at a page for 'Digital Camera Model 3.4', a discontinued product that you no longer stock, you can make a good assumption that the customer is interested in digital cameras, so why not show a few alternatives or at the very least a link to the digital cameras section of your site.
The approach is not to trick your customers, it is more to reassure them that all is well and it is just a hiccup, rather than seeing horrible error messages which could put them off for good.