Significance
Commensal microbiota are known to be required for the elicitation of host Th17 responses, which may mediate autoimmune diseases. Here, we demonstrate that the IL-23 pathway dynamically regulates the abundance of certain commensals and maintains barrier function. Barrier disruption results in systemic dissemination of microbial products, which invokes the IL-23 pathway, with both beneficial and potentially deleterious consequences. Through induction of IL-22, IL-23 contributes to barrier repair, and through induction of the Th17 response, it aims to neutralize escaped commensal microbes. Thus, barrier disruption results in a pro-Th17 environment in which not only antimicrobial but also potentially antihost Th17 cells can develop.