Genetic studies in Drosophila have demonstrated that generation of microbicidal reactive oxygen species (ROS) through the NADPH dual oxidase (DUOX) is a first line of defense in the gut epithelia. Bacterial uracil acts as DUOX-activating ligand through poorly understood mechanisms. Here, we show that the Hedgehog (Hh) signaling pathway modulates uracil-induced DUOX activation. Uracil-induced Hh signaling is required for intestinal expression of the calcium-dependent cell adhesion molecule Cadherin 99C (Cad99C) and subsequent Cad99C-dependent formation of endosomes. These endosomes play essential roles in uracil-induced ROS production by acting as signaling platforms for PLCβ/PKC/Ca(2+)-dependent DUOX activation. Animals with impaired Hh signaling exhibit abolished Cad99C-dependent endosome formation and reduced DUOX activity, resulting in high mortality during enteric infection. Importantly, endosome formation, DUOX activation, and normal host survival are restored by genetic reintroduction of Cad99C into enterocytes, demonstrating the important role for Hh signaling in host resistance to enteric infection.