The composition of the mammalian gut microbiota can be influenced by a multitude of environmental variables such as diet and infections. Studies investigating the effect of these variables on gut microbiota composition often sample across multiple separate populations and habitat types. In this study we explore how variation in the gut microbiota of the house mouse (Mus musculus domesticus) on the Isle of May, a small island off the east coast of Scotland, is associated with environmental and biological factors. Our study focuses on the effects of environmental variables, specifically trapping location and surrounding vegetation, as well as the host variables sex, age, body weight and endoparasite infection, on the gut microbiota composition across a fine spatial scale in a freely interbreeding population. We found that differences in gut microbiota composition were significantly associated with the trapping location of the host, even across this small spatial scale. Sex of the host showed a weak association with microbiota composition. Whilst sex and location could be identified as playing an important role in the compositional variation of the gut microbiota, 75% of the variation remains unexplained. Whereas other rodent studies have found associations between gut microbiota composition and age of the host or parasite infections, the present study could not clearly establish these associations. We conclude that fine spatial scales are important when considering gut microbiota composition and investigating differences among individuals.