The yjdF motif RNA is an orphan riboswitch candidate that almost exclusively associates with the yjdF protein-coding gene in many bacteria. The function of the YjdF protein is unknown, which has made speculation regarding the natural ligand for this putative riboswitch unusually challenging. By using a structure-probing assay for ligand binding, we found that a surprisingly broad diversity of nitrogen-containing aromatic heterocycles, or "azaaromatics," trigger near-identical changes in the structures adopted by representative yjdF motif RNAs. Regions of the RNA that undergo ligand-induced structural modulation reside primarily in portions of the putative aptamer region that are highly conserved in nucleotide sequence, as is typical for riboswitches. Some azaaromatic molecules are bound by the RNA with nanomolar dissociation constants, and a subset of these ligands activate riboswitch-mediated gene expression in cells. Furthermore, genetic elements most commonly adjacent to the yjdF motif RNA or to the yjdF protein-coding region are homologous to protein regulators implicated in mitigating the toxic effects of diverse phenolic acids or polycyclic compounds. Although the precise type of natural ligand sensed by yjdF motif RNAs remains unknown, our findings suggest that this riboswitch class might serve as part of a genetic response system to toxic or signaling compounds with chemical structures similar to azaaromatics.