The relationship between microbiota and health has been widely reported in humans and animals. We established a link between teat cistern microbiota composition and bovine mastitis, an inflammatory disease often due to bacterial infections. To further decipher the relationships between teat cistern microbiota and immune and microbial responses, a switch from twice- to once-daily milking (ODM) in 31 initially healthy quarters of dairy cows was used to trigger an udder perturbation. In this study, a temporal relationship was reported between initial teat cistern microbiota composition and richness, the immune response to ODM, and mastitis development. Quarters with a low initial microbiota richness and taxonomic markers such as Bacteroidetes and Proteobacteria were associated with a higher rate of mastitis during ODM. Quarters with a higher richness and taxonomic markers such as Firmicutes, including the Lachnospiraceae family, and genera such as Bifidobacterium and Corynebacterium displayed early inflammation following transition to ODM but without developing mastitis (no infection). Short-term compositional shifts of microbiota indicates that microbiotas with a higher initial richness were more strongly altered by transition to ODM, with notably the disappearance of rare OTUs. Microbiota modifications were associated with an early innate immune system stimulation, which, in turn, may have contributed to the prevention of mastitis development.