Background: Host-associated microbiomes, the microorganisms occurring inside and on host surfaces, influence evolutionary, immunological, and ecological processes. Interactions between host and microbiome affect metabolism and contribute to host adaptation to changing environments. Meta-analyses of hostassociated bacterial communities have the potential to elucidate global-scale patterns of microbial community structure and function. It is possible that host surface-associated (external) microbiomes respond more strongly to variations in environmental factors, whereas internal microbiomes are more tightly linked to host factors. Results: Here, we use the dataset from the Earth Microbiome Project and accumulate data from 50 additional studies totaling 654 host species and over 15,000 samples to examine global-scale patterns of bacterial diversity and function. We analyze microbiomes from non-captive hosts sampled from natural habitats and find patterns with bioclimate and geophysical factors, as well as land use, host phylogeny, and trophic level/ diet. Specifically, external microbiomes are best explained by variations in mean daily temperature range and precipitation seasonality. In contrast, internal microbiomes are best explained by host factors such as phylogeny/immune complexity and trophic level/diet, plus climate. Conclusions: Internal microbiomes are predominantly associated with top-down effects, while climatic factors are stronger determinants of microbiomes on host external surfaces. Host immunity may act on microbiome diversity through top-down regulation analogous to predators in non-microbial ecosystems. Noting gaps in geographic and host sampling, this combined dataset represents a global baseline available for interrogation by future microbial ecology studies.