1. The nature of endosymbiont interactions is driven by different ecological and evolutionary processes. In herbivorous reptiles exhibiting sexual dimorphism, it remains unclear whether host´s sex and habitat type influence their interactions with hindgut nematodes. 2. To explore this, we sampled spur-thighed tortoises (Testudo graeca) across different land-use practices in southern Spain (Mediterranean shrublands, traditional and intensified agricultural fields, pine plantations, and unproductive lands). For male and female tortoises, we assessed the relationships between nematode infestation with body traits (weight, height, volume, plastron width, and carapace length) and growth rates, across different land uses. Further, we investigated differences in species composition and diversity of hindgut nematode communities between sexes. Finally, with an intrapopulation ecological network approach, we evaluated the structure and diversity of tortoise-nematode interactions by focusing on nematode species infesting individual male and female tortoises. 3. The results revealed a sex-mediated relationship between nematodes and tortoises. Although nematode prevalence and infestation were similar between sexes, infestation increased with body size and weight in females, whereas in males, infestation was negatively related to size. At low levels of nematode infestation, males grew faster than females; however, as infestation increased, male growth rates declined, whereas female growth remained stable. In both sexes, nematode infestation decreased with the proportion of unproductive lands, and growth rates increased significantly in response to this landscape characteristic. Females hosted significantly more diverse and evenly distributed nematode communities than males despite low compositional dissimilarity between sexes. Nestedness was greater in female-nematode networks, suggesting that nematodes can be more easily transmitted across these networks compared with males. 4. Overall, females seem more resilient to nematode infestation than males. These findings have important implications for understanding the complex interactions between hindgut nematodes, habitat loss and host ecophysiological traits, which emphasises the need for sex-directed conservation approaches for tortoises.