Allostery is a pervasive principle to regulate protein function. Here, we show that DNA also transmits allosteric signals over long distances to boost the binding cooperativity of transcription factors. Phenotype switching in Bacillus subtilis requires an all-or-none promoter binding of multiple ComK proteins. Using single-molecule FRET, we find that ComK-binding at one promoter site increases affinity at a distant site. Cryo-EM structures of the complex between ComK and its promoter demonstrate that this coupling is due to mechanical forces that alter DNA curvature. Modifications of the spacer between sites tune cooperativity and show how to control allostery, which paves new ways to design the dynamic properties of genetic circuits.