Genetic variation in plants can influence the community structure of associated species, through both direct and indirect interactions. Herbivorous insects are known to feed on a restricted range of plants, and herbivore preference and performance can vary among host plants within a species due to genetically based traits of the plant (e.g., defensive compounds). In a natural system, we expect to find genetic variation within both plant and herbivore communities and we expect this variation to influence species interactions. Using a three-species plant-aphid model system, we investigated the effect of genetic diversity on genetic interactions among the community members. Our system involved a host plant (Hordeum vulgare) that was shared by an aphid (Sitobion avenae) and a hemi-parasitic plant (Rhinanthus minor). We showed that aphids cluster more tightly in a genetically diverse host-plant community than in a genetic monoculture, with host-plant genetic diversity explaining up to 24% of the variation in aphid distribution. This is driven by differing preferences of the aphids to the different plant genotypes and their resulting performance on these plants. Within the two host-plant diversity levels, aphid spatial distribution was influenced by an interaction among the aphid's own genotype, the genotype of a competing aphid, the origin of the parasitic plant population, and the host-plant genotype. Thus, the overall outcome involves both direct (i.e., host plant to aphid) and indirect (i.e., parasitic plant to aphid) interactions across all these species. These results show that a complex genetic environment influences the distribution of herbivores among host plants. Thus, in genetically diverse systems, interspecific genetic interactions between the host plant and herbivore can influence the population dynamics of the system and could also structure local communities. We suggest that direct and indirect genotypic interactions among species can influence community structure and processes.