Mucosal surfaces are in direct contact with the external environment, making them the first point of contact between a host and an invading pathogen. Furthermore, mucosa are colonized by an array of commensal and beneficial microorganisms, meaning that the mucosal immune system must be able to differentiate between friend and foe. This Focus highlights the latest research providing insights into the composition of our mucosal microbial communities, the host and environmental factors that shape these communities, their interaction with the immune system and the impact of antibiotics on them.