The increasing appreciation this last decade that associated microorganisms (`microbiota') are fundamentally tied to the basic physiological and biological processes of virtually all organisms on the planet necessitates we revise many established models to account for the influences of these microorganisms. One such model is our understanding of the impact of spatially varying selection on animal populations, which has traditionally described how the pressures of distinct environmental characters on animal genotype lead to favorable phenotypic outcomes in distinct geographic locations. Recent evidence, including our preliminary work, shows that the abundance of different members of the microbiota also varies predictably with geography, suggesting the abundance and identity of associated microorganisms may be related to these locally adaptive processes. A major gap is that virtually all the current work in this area is descriptive, attributing geography-dependent variation in host-associated microbiota to environmental or host genetic variation without defining the underlying mechanisms. Thus, we propose an experimental design to explicitly define how variation in a model animal's microbiota is established. Our approach is based on defining specific influences for two of the most obvious candidate processes: the environment, including diet, and host genotype. To understand if the environment determines geographic variation in the microbiota we will compare the microbiota of wild flies in the eastern United States, a broad location across which the microbiota is known to vary predictably with geography, with the microbiota of their diet and abiotic environment. We will also rear flies in the laboratory and the wild under different environmental conditions (temperature, photoperiod, and humidity), to define causal deterministic roles for these characters on the fly microbiota. Then, to reveal how host genotype influences the fly microbiota we will focus on one host process, feeding preference, and how this process influences the composition of the fly microbiota. Since the sequences of many fly feeding preference genes vary in the eastern United States, we will also create fly mutants that swap alleles between flies from different geographies, to determine if these alleles are responsible for variation in fly feeding preference and microbiota composition with fly geography. Together, the results will define the relative contributions of the environment and host genotype in determining geographic variation in the microbiota of the fruit fly, the organism upon which many of our current models of animal evolution are based. Thus, our findings will be directly relevant to current models, and will facilitate the incorporation of the microbiota and its predictable geographic variation into improved definitions of animal evolution.