Camera-trapping-based social network analysis (SNA) is a valuable tool to characterize communities and identify species with an outstanding role in pathogen maintenance. This study provides new insights into the contentious debate on the effect of biodiversity on disease risk by combining SNA with the assessment of host diversity indicators and pathogen richness in Spain. The apparent species richness detected by camera traps at each study site ranged from 10 to 33 species (mean ± standard error (SE): 20.73 ± 1.94) and their apparent diversity rates (i.e., Shannon index) ranged from 0.57 to 2.55 (mean ± SE: 1.97 ± 0.16). At the community level, vertebrate host diversity had a marginal dilution effect on the disease risk and was negatively correlated to pathogen richness. The exposure to multiple pathogens, as a proxy of disease risk, was negatively associated with apparent host diversity. The disease risk was driven by the interaction of apparent biodiversity with the presence of livestock and with the centrality of the indicator species (i.e., the wild boar). The maximum risk of co-exposure to pathogens was reached when the lowest apparent biodiversity rates coincided with the highest wild boar centrality in the host community or with the presence of livestock, respectively. The highest confluence of pathogens occurred at lower apparent diversity indexes, higher wild boar relative abundances and predominance of agricultural lands. Our results suggest that the diversity-disease relationship is not linear and depends on the environment and host community characteristics, thereby opening avenues for designing new prevention strategies.