Microbial colonization plays an instrumental role in the health of the host. However, the host factors that facilitate the establishment of the microbial colonization remain unclear. Here, we establish a screening method to identify host factors regulating E. coli colonization in C. elegans. We find that a BCF-1 possessing N-glycosylation promotes E. coli colonization by directly binding to E. coli via its fimbrial protein, YdeR. BCF-1 is activated by the bacteria and interacts with an oligosaccharyl transferase, OSTB-1, which is critical for regulating E. coli colonization. We also show that the N-glycosylation of BCF-1 is critical for E. coli colonization. In addition, we find that the microbiota composition is shaped by BCF-1. In summary, this study shows a "scaffold model" for bacterial colonization between a host glycoprotein and E. coli, and it also introduces a powerful research approach to identify individual host factors involved in modulating bacterial colonization.