Processes shaping the distribution of foliar fungal endophyte species remain poorly understood. Despite increasing evidence that these cryptic fungal symbionts of plants mediate interactions with pathogens and herbivores, there remain basic questions regarding the extent to which dispersal limitation and host specificity might shape fungal endophyte community composition in rainforests. To assess the relative importance of spatial pattern and host specificity, we isolated fungi from a sample of mapped trees in lowland Papua New Guinea. Sequences of the internal transcribed spacer (ITS) region were obtained for 2079 fungal endophytes from three sites and clustered into molecular operational taxonomic units (MOTUs) at 95% similarity. Multivariate analyses suggest that host affinity plays a significant role in structuring endophyte community composition whereas there was no evidence of endophyte spatial pattern at the scale of tens to hundreds of metres. Differences in endophyte communities between sampled trees were weakly correlated with variation in foliar traits but not with tree species relatedness. The dominance of relatively few generalist endophytes and the presence of a large number of rare MOTUs was a consistent observation at three sites separated by hundreds of kilometres and regional turnover was low. Host specificity appears to play a relatively weak but more important role than dispersal limitation in shaping the distribution of fungal endophyte communities in New Guinea forests. Our results suggest that in the absence of strong ecological gradients and host turnover, beta diversity of endophyte communities could be low in large areas of contiguous forest.