Cyclic dinucleotides are bacterial signal transducers that bind to host intracellular protein, stimulator of interferon genes (STING) encoded by Tmem173. In this study, we demonstrate that STING triggers adaptive immune responses that control Th17 differentiation. Cyclic dinucleotides recognition enables classical dendritic cells (cDCs) that predominantly express CD103 to induce Th17 lymphocytes in an IL-6/IL-1β-dependent manner in gut. STING expression in human lamina propria is associated with the severity of mucosal inflammation and clinical disease activity in patients with Crohn’s disease. Mice deficient in Tmem173 fail to mount Th17 responses to cyclic dinucleotides or prevent immune evasion of enteroinvasive pathogens. In summary, STING in mucosal cDCs controls Th17 subspecification that is essential for host defenses against microbial infection in gut-associated immune system.