The present experiment aimed to study the influence of six sources of non-digestible carbohydrates (NDC) on the mucous layer in the colon of rats. The NDC sources used were as follows: cellulose (C); pectin (P); inulin; resistant starch (RS); barley hulls. The diets contained 108–140 g NDC/kg DM. A fibre-free (FF) diet served as a control. The diets were fed to forty-eight rats for 34–41 d. The thickness of the total mucous layer in the colon was increased (P < 0·05) in rats fed C, P and RS when compared with rats fed a FF diet. In the colon, positive correlations were observed between the total thickness of the mucous layer and the area of neutral mucins, the pool of SCFA and the pool of acetic acid, while it was negatively correlated with the proportion of butyrate. The total thickness of the mucous layer was not correlated with the MUC gene transcription. The transcription of the gene MUC2 was negatively correlated (P = 0·04), whereas the transcription of MUC3 was positively correlated (P = 0·05) with the butyrate pool in the caecum. No correlations between the MUC2 or MUC3 transcription and SCFA were found in the colon. Hence, the regulation of the MUC genes differs between the compartments of the hindgut and, within compartments, the MUC genes may be regulated differently. In conclusion, a diet providing a large pool of SCFA with a low proportion of butyrate in the colon stimulates the formation of a thick mucous layer, which probably benefits intestinal health.