SummaryThe skin and mucosal epithelia of humans and other mammals are permanently colonized by large microbial communities (the microbiota). Due to this life‐long association with the microbiota, these microbes have an extensive influence over the physiology of their host organism. It is now becoming apparent that nearly all tissues and organ systems, whether in direct contact with the microbiota or in deeper host sites, are under microbial influence. The immune system is perhaps the most profoundly affected, with the microbiota programming both its innate and adaptive arms. The regulation of immunity by the microbiota helps to protect the host against intestinal and extra‐intestinal infection by many classes of pathogen. In this review, we will discuss the experimental evidence supporting a role for the microbiota in regulating host defences to extra‐intestinal infection, draw together common mechanistic themes, including the central role of pattern recognition receptors, and outline outstanding questions that need to be answered.