Microbiota is essential to the development and functional maturation of the immune system. The effects of the gut microbiota on myeloid cells remote from the gut, especially the skin remain unclear. Transcriptomic analysis revealed that type I interferon (IFN) signaling was down-regulated in the skin of germ-free mice compared to that in specific pathogen-free mice. The decrease in type I IFN signaling was closely related to the presence of microbiota and macrophage-specific marker CD169. The absence of CD169(+) macrophages resulted in increased bacterial burden and impaired immune responses against Staphylococcus aureus skin infection. CD169(+) macrophages mediated the recruitment of gammadelta T cells as well as the activation of gammadelta T cells via interleukin (IL)-23. Our findings demonstrate the role of the microbiota in establishment of a specific myeloid cell subset expressing CD169 in the skin and provide evidence of a specific mechanism by which this subset protects against bacterial skin infection.