Milk oligosaccharides contribute to the development of the intestinal environment by acting as decoy receptors for pathogens and as prebiotics, which promote the colonization of commensal bacteria. Here, using α2,3- and α2,6-sialyltransferase-deficient mice, we investigated the role of the sialylated milk oligosaccharides sialyl(α2,3)lactose and sialyl(α2,6)lactose on mucosal immunity. The exposure of newborn mice to milk containing or deficient in sialyllactose had no impact on the development of mucosal leukocyte populations. However, when challenged by dextran sulfate sodium (DSS) in drinking water, adult mice that had been fostered on sialyl(α2,3)lactose-deficient milk were more resistant to colitis compared with mice fostered on normal milk or sialyl(α2,6)lactose-deficient milk. Analysis of intestinal microbiota showed different colonization patterns depending on the presence or absence of sialyl(α2,3)lactose in the milk. Germ-free mice reconstituted with intestinal microbiota isolated from mice fed on sialyl(α2,3)lactose-deficient milk were more resistant to DSS-induced colitis than germ-free mice reconstituted with standard intestinal microbiota. Thus, exposure to sialyllactose during infancy affects bacterial colonization of the intestine, which influences the susceptibility to DSS-induced colitis in adult mice.