We present a simple one-dimensional model to find design criteria for a scanning tunneling microscope (STM) minimizing the response of the tip-sample distance to external mechanical disturbances. The underlying concept-achieving a response that is in phase and same amplitude goes beyond the conventional approach to construct the STM as stiff as possible. It introduces optimization conditions relating the resonance frequencies of the different components to the STM assembly, which can be implemented accordingly during the STM design process. In this way an improvement in the response to external disturbances of several orders of magnitude can be achieved. Calculations for three typical STM designs are presented along with the corresponding optimization criteria. For one of the designs an improvement in performance has been experimentally verified. The results can also be extended to other scanning probe techniques. (C) 2008 American Institute of Physics. [DOI: 10.1063/1.2979008]