Bacterial second messenger cyclic di-AMP (c-di-AMP) is implicated in signaling DNA damage and cell wall stress through interactions with several protein receptors and a widespread ydaO-type riboswitch. We report the crystal structures of c-di-AMP riboswitches from Thermoanaerobacter pseudethanolicus and Thermovirga lienii determined at ∼3.0-Å resolution. In both species, the RNA adopts an unforeseen 'square'-shaped pseudosymmetrical architecture that features two three-way junctions, a turn and a pseudoknot, positioned in the square corners. Uncharacteristically for riboswitches, the structure is stapled by two ligand molecules that span the interior of the structure and employ similar noncanonical interactions for RNA recognition. Mutations in either ligand-binding site negatively affect c-di-AMP binding, suggesting that the riboswitch-triggered genetic response requires contribution of both ligands. Our data provide what are to our knowledge the first insights into specific sensing of c-di-AMP and a molecular mechanism underlying the common c-di-AMP-dependent control of essential cellular processes in bacteria.