This study shows that surface-supported two-dimensional (2D) porous covalent organic frameworks (COFs) can selectively bind different molecules at specific sites via different types of interactions. Scanning tunneling microscopy (STM) images collected at the liquid/solid interface reveal the adsorption of 1,2,4-trichlorobenzene (TCB) in the hexagonal pore of a COF-1 template. A well-defined loop boundary formed by a chain of pentagonal and heptagonal pores allowed the investigation of the effect of pore shape and size on TCB adsorption, suggesting that both geometrical and size effects are important in binding TCB.When both C 60 and TCB are present at the solution/solid interface, the TCB molecules are selectively trapped in the pore-site, whereas fullerenes are adsorbed on the top-site of COF-1. While the former structure is stabilized by Cl⋯H hydrogen bonds, the latter is controlled by van der Waals interactions.These results suggest that COFs may offer a powerful platform for the recognition and patterning of guest molecules.