The intestinal mucus layer and endogenous microbiota are strongly intertwined and this contributes to the maintenance of the epithelial barrier and ultimately of gut homeostasis. To understand the molecular foundations of such relationship, we investigated if the nature of the microbiota transcriptionally regulates mucus layer composition in vivo. We found that the expression of mucins 1 to 4 and trefoil factor 3 was down-regulated in the ileum and colon of conventional and reconventionalized mice compared with germ-free animals. Conversely, very limited colon-restricted changes in transmembrane mucins were detected in mice colonized with human adult or baby microbiota. Moreover, by microarray analysis, the murine endogenous microbiota was found to modulate genes putatively involved in mucin secretion. These findings show that a well-established microbial community participates in the regulation of the gut mucus layer and that its composition and adequacy to the host are key factors in this process.