Snakes are important predators of birds' nests, but the ecological factors that bring snakes and birds into contact are poorly known. One hypothesis is that snakes choose habitats based on abundance of alternative prey such as small mammals, with avian nest predation in those habitats arising coincidentally. At a study site in southern Illinois, we used radio telemetry to test the hypothesis that ratsnakes (Elaphe obsoleta) and racers (Coluber constrictor) preferentially use forest edges because small mammals are more abundant in edges. Diet analysis confirmed that both snake species preyed on birds and mammals. Although overall habitat use differed, both snake species preferentially used forest edges. Conversely, species of small mammals on which the snakes preyed were not more abundant (determined by live trapping) in edges, and seasonal variation in habitat use by snakes and mammalian prey abundance were not correlated. These results suggest that alternative hypotheses (e.g., abundance of nesting birds, thermoregulation) are more promising explanations for why these snakes preferentially use edges.