Shortening or omitting the dry period (DP) in dairy cows is of interest because of potential beneficial effects on energy balance and metabolic health. Reported effects of a short or omitted dry period on udder health are ambiguous. This study aimed to evaluate the effect of no DP (0 d), a short DP (30 d), or a conventional DP (60 d) on the occurrence of intramammary infections (IMI) during the precalving period and on somatic cell counts (SCC), elevations of SCC (SCC ≥ 200,000 cells/mL), and clinical mastitis in the subsequent lactation. The study also aimed to analyze which prepartum cow characteristics are associated with udder health after different DP lengths. Holstein-Friesian dairy cows (n = 167) were randomly assigned to a DP length (0, 30, or 60 d). Cows with a 0-d DP had a greater occurrence of chronic IMI and a lower occurrence of cured IMI during the precalving period than cows with a 30-d or 60-d DP. Postpartum average SCC for lactation was greater in cows with a 0-d DP than in cows with a 30-d or 60-d DP. The number of cows with at least 1 elevation of SCC, the number of elevations of SCC per affected cow, the number of cows treated for clinical mastitis, and the number of cases of mastitis per affected cow did not differ among DP lengths. Cow characteristics related to postpartum average SCC for lactation were DP length, parity, and the following interactions: DP length with prepartum elevation of SCC, DP length with fat- and protein-corrected milk (FPCM) reduction between 150 and 67 d prepartum, DP length with parity and with average SCC for lactation, and last FPCM before the conventional drying-off day with average SCC for lactation. Cows with prepartum parity 1 had a lower occurrence of at least 1 elevation of SCC in subsequent lactation compared with cows with parity >2. Last SCC before the conventional drying-off day was positively associated with occurrence of clinical mastitis in the subsequent lactation. In this study, DP length was not a risk factor for either elevation of SCC or occurrence of clinical mastitis in the subsequent lactation. The identified cow characteristics could be used in a decision support model to optimize DP length for individual cows.