If users frequently look for something on your site that you don't have, then it is best to tell them no up front. Otherwise you will antagonize them by forcing them to waste time rooting around for something that's not there. Any failed user task reduces the user's respect for your site and makes it less likely that the user will return and try to do something else on your site.
Of course, the very best solution is to add whatever people are looking for, so that the site can satisfy these major user needs. Doing so is the most basic principle of usability. But sometimes you simply cannot do what users want:
Regulations, contracts, licensing terms, or other legal reasons prevent you from putting some things online. For example, a magazine may only have print rights but not online rights to an article.
You cannot afford something that users would like. For example, your customer support call center is not staffed 24 hours a day (or you don't even have a support line).
Business analysis concludes that there are certain things you will not do. For example, you don't ship product overseas. Or you only carry a video in American format but not European format.
You may simply be out of stock of something. Even worse (but quite likely), you are out of stock of the hottest current best-seller which lots of people are looking for.
The feature is planned for later (say, it's an upcoming product), but it is not available yet.
If you don't say anything, users will spend a long time looking around your site in the hunt for the missing feature. Eventually they will give up, but not until they have acquired a good deal of distaste for your site, feeling it to be confusing and unhelpful. Even if your navigation system works perfectly and guides the users to the "right place," they won't see anything, so they will conclude that the navigation doesn't work.
Much better to have an explicit target destination in the logical place for all frequent user tasks, even those you don't support. This target could be a product page (without a "click here to buy" button), a FAQ entry, or a part of the customer service section of the site. Wherever users would naturally be going when looking for the missing feature. This is the logical place to say that the feature is not available and maybe explain why. Users will thank you.
How to discover what features users want that you don't have?
Your search logs show what people are looking for but not finding.
Customer service phone calls and emails.
Other sites: if most of the top-ten sites in your field offer a certain feature, then you can bet that users have come to expect it and will be looking for it on your site.
In addition to telling the users that you cannot satisfy their needs, you should avoid leaving them stranded.
This goes against the grain of many sales people, but sometimes it is best to link to another site that does offer the solution. Sure, you will lose this sale, but you would have lost it anyway , and by giving the user a useful referral, you will have won credibility points. Just as important, you will have secured a position in the user's mind as the place to start the next time they go looking for solutions. Also, you may try to get a referral fee for the link so that you do recapture some revenue.
The happiest case is the one where something is currently unavailable but will become available reasonably soon:
If you know the availability date for sure and it is less than a week away, then simply tell users the date and ask them to check back. Or allow them to pre-order if the price and product description are known.
If the availability date is uncertain or is too far into the future for users to remember, then offer users the option to enter their email address to be notified when the product or service becomes available. Add an explicit statement that the email address will only be used for this one mailing and never again. Honor this promise.
Finally, think of ways to offer an alternative solution. For example, maybe you sell another product that is almost as good or practically the same. If you have a better, but more expensive, product available, consider offering a special discount to compensate the user for the trouble of navigating to another product than the one they originally wanted. If you always just link people to more expensive products they will suspect that you are running a bait-and-switch operation.
Usability Tests of Missing Features
I usually don't like asking test users to try to do something that is impossible. Since most websites are so bad, the average usability test results in plenty of user failures anyway where users can't perform a task, even when all the tasks are possible in theory. Thus, we usually don't have to do anything special to discover how users react in the case of failure and how soon they give up.
When testing the rare site with great usability, you may want to include an impossible task in order to study what users do when they can't find the solution. In real life, users are certainly often faced with sites that simply do not offer the thing they want. And you want to see how quickly users give up (usually after 10 minutes or less), what aspects of the site makes users conclude whether or not they can accomplish the task, and what alternative solutions they pursue.