PDZ domain proteins play critical roles in binding, clustering and subcellular targeting of membrane receptors and ion channels. PDZ domains in multi-PDZ proteins often are arranged in groups with highly conserved spacing and intervening sequences; however, the functional significance of such tandem arrangements of PDZs is unclear. We have solved the three-dimensional structure of the first two PDZ domains of postsynaptic density protein-95 (PSD-95 PDZ1 and PDZ2), which are closely linked to each other in the PSD-95 family of scaffold proteins. The two PDZs have limited freedom of rotation and their C-terminal peptide-binding grooves are aligned with each other with an orientation preference for binding to pairs of C termini extending in the same direction. Increasing the spacing between PDZ1 and PDZ2 resulted in decreased binding between PDZ12 and its dimeric targets. The same mutation impaired the functional ability of PSD-95 to cluster Kv1.4 potassium channels in heterologous cells. The data presented provide a molecular basis for preferential binding of PSD-95 to multimeric membrane proteins with appropriate C-terminal sequences.