Our results suggest an important role of microbiota-mediated AhR activation in the pathogenesis of endometritis and provide potential strategies for the intervention of infectious diseases and reproductive health by regulating the gut microbiota and metabolism. The gene discussed is AHR; the disease is infectious disease.