Here, we explore the relationship between dietary fibers, colonic epithelium major histocompatibility complex class II (MHC-II) expression, and immune cell interactions in regulating susceptibility to Clostridioides difficile infection (CDI). We find that a low-fiber diet increases MHC-II expression in the colonic epithelium, which, in turn, worsens CDI by promoting the development of pathogenic CD4