The intestinal microbiota has a critical role in immune system and metabolic homeostasis, but it must be tolerated by the host to avoid inflammatory responses that can damage the epithelial barrier separating the host from the luminal contents. Breakdown of this regulation and the resulting inappropriate immune response to commensals are thought to lead to the development of inflammatory bowel diseases such as Crohn's disease and ulcerative colitis. We proposed that the intestinal immune system is instructed by the microbiota to limit responses to luminal antigens. Here we demonstrate in mice that, at steady state, the microbiota inhibits the transport of both commensal and pathogenic bacteria from the lumen to a key immune inductive site, the mesenteric lymph nodes (MLNs). However, in the absence of Myd88 or under conditions of antibiotic-induced dysbiosis, non-invasive bacteria were trafficked to the MLNs in a CCR7-dependent manner, and induced both T-cell responses and IgA production. Trafficking was carried out by CX(3)CR1(hi) mononuclear phagocytes, an intestinal-cell population previously reported to be non-migratory. These findings define a central role for commensals in regulating the migration to the MLNs of CX(3)CR1(hi) mononuclear phagocytes endowed with the ability to capture luminal bacteria, thereby compartmentalizing the intestinal immune response to avoid inflammation.