Rotaxanes with cyclodextrin end groups have been used as a platform to investigate anion binding in water, revealing that halogen bonding can serve as the basis for molecular recognition in aqueous solvents, which may have implications in medicinal chemistry and beyond.