Cyclic dinucleotides are second messengers that target the adaptor STING and stimulate the innate immune response in mammals. Besides protein receptors, there are bacterial riboswitches that selectively recognize cyclic dinucleotides. We recently discovered a natural riboswitch that targets 3',3'-cGAMP, which is distinguished from the endogenous mammalian signal 2',3'-cGAMP by its backbone connectivity. Here, we report on structures of the aptamer domain of the 3',3'-cGAMP riboswitch from Geobacter in the 3',3'-cGAMP and c-di-GMP bound states. The riboswitch adopts a tuning fork-like architecture with a junctional ligand-binding pocket and different orientations of the arms are correlated with the identity of the bound cyclic dinucleotide. Subsequent biochemical experiments revealed that specificity of ligand recognition can be affected by point mutations outside of the binding pocket, which has implications for both the assignment and reengineering of riboswitches in this structural class.