Species interactions are a unifying theme in ecology and evolution. Both fields are currently moving beyond their historical focus on isolated pairwise relationships to understand how ecological communities affect focal interactions. Additional species can modify both the number of interactions and the fitness consequences of each interaction (i.e., selection). Although only selection affects the evolution of the focal interaction, the two are often conflated, limiting our understanding of the evolution of multispecies interactions. We manipulated aboveground herbivory on the legume Medicago lupulina in the field and quantified its effect on number of symbionts and the per-symbiont impact on plant performance in two belowground symbioses: mutualistic rhizobia bacteria (Ensifer meliloti) and parasitic root-knot nematodes (Meloidogyne hapla). We found that herbivores modified the number of rhizobia nodules, as well as the benefit per nodule. However, each effect was specific to a distinct herbivory regime: natural herbivory affected nodule number, whereas leafhoppers (Cicadellidae) weakened the per nodule benefit. We did not detect any effect of herbivory on nematode gall number or the cost of infection. Our data demonstrate that distinguishing between symbiont number from the fitness consequences of symbiosis is crucial to accurately infer how pairwise interactions will evolve in a community.