We examine the impact of consumer search from the perspective of revenue‐maximizing optimal auction design. In this two‐sided market, advertisers are endowed with privately known qualities, and consumers incur heterogeneous search costs when clicking on advertisements displayed by the search engine. Our general approach eliminates ad hoc restrictions and therefore allows us to uncover the salient economic trade‐offs. We adopt the optimal mechanism design approach to examine this two‐sided private information problem. The optimal mechanism design approach gives rise to the truly revenue‐maximizing scheme, and yields managerial implications that are substantially different from the literature. We show that from the revenue maximization perspective, the search engine necessarily displays the advertisers in the descending order of their qualities. The search engine shall insert unnecessary hassles to induce the revenue‐maximizing search behaviors. Thus, each consumer stops searching pre‐maturely compared to the socially optimal search behavior. In addition, the search engine shall implement probabilistic forced termination upon consumers’ clicking on advertisements, and this probability is higher for advertisers with poorer qualities. When each advertiser has a two‐dimensional type on consumer learning and matching, even if consumers’ search costs become negligible, the allocative inefficiency does not vanish. Moreover, no strategic obfuscation is imposed. When allowing for non‐independent qualities, we show that product variety does not constitute a rationale for advertisers’ favoritism.