The relationship between biosecurity and digital dermatitis (DD) was evaluated in 8,269 cows from a convenience sample of 39 freestall dairy herds. The hypothesis was that poor implementation of biosecurity was associated with higher within-herd prevalence of DD. All lactating cows were scored as negative or positive for DD at the hind legs during milking in the milking parlor. Information about biosecurity was obtained through questionnaires addressed to farmers, on-farm observations, and information from the Danish Cattle Database (www.seges.dk). These assessment tools covered potential infection sources of DD pathogens to susceptible cows (e.g., via animals, humans, manure, vehicles, equipment, and facilities). External and internal biosecurity measures were explanatory variables in 2 separate logistic regression models, whereas within-herd DD prevalence was the outcome. Overall DD prevalence among cows and herds were 24 and 97%, respectively; the within-herd DD prevalence ranged from 0 to 56%. Poor external biosecurity measures associated with higher prevalence of DD were recent animal purchase, access to pasture, lack of boots available for visitors, farm staff working at other dairy farms as well, hoof trimming without a professional attending, and animal transporters having access to cattle area. For internal biosecurity, higher DD prevalence were associated with infrequent hoof bathing, manure scraping less than 8 times a day, manure removal direction from cows to heifers, animal pens' exit without water hoses, manure-handling vehicle used in other activities, and water troughs contaminated with manure. These findings showed that improvements on biosecurity may be beneficial for controlling DD in dairy herds. The study is relevant for farmers facing problems with DD, as well as hoof trimmers, advisors, and veterinarians, who can use the results for optimized recommendations regarding biosecurity in relation to DD. Furthermore, our results might be considered by future studies investigating DD pathogen reservoirs and transmission routes.