Bacterial adhesion to host receptors is an early and essential step in bacterial colonization, and the nature of adhesion-receptor interactions determines bacterial localization and thus the outcome of these interactions. Here, we determine the host receptors for the Multivalent Adhesion Molecule from the gut commensal E. coli HS (MAMHS), which contains an array of seven mammalian cell entry (MCE) domains. The MAMHS adhesin interacts with a range of host receptors, through recognition of a shared 3-O-sulfo-galactosyl moiety. This functional group is also found in mucin, a component of the intestinal mucus layer and thus one of the prime adherence targets for commensal E. coli. Mucin gels impede the motility of E. coli by acting as a physical barrier, and the barrier effect is enhanced by specific interactions between mucin and MAMHS in a sulfation-dependent manner. Desulfation of mucin by pure sulfatase or the sulfatase-producing commensal Bacteroides thetaiotaomicron decreases binding of E. coli to mucin and increases attachment of bacteria to the epithelial surface, through interactions with surface-localized sulfated lipid and protein receptors. Together, our results demonstrate that the E. coli adhesin MAMHS facilitates retention of a gut commensal by mucin, and suggest that the amount of sulfatase secreted by mucin-foraging bacteria inhabiting the same niche, such as B. thetaiotaomicron, may affect the capacity of the mucus barrier to retain commensal E. coli.