GPS-based virtual fencing systems enable grazing without physical fences by conditioning animals to acoustic signals to avoid electric pulses. The present study investigated whether dairy cows were capable of learning a virtual fencing system in rotational grazing and whether their well-being was affected. Twenty dairy cows were divided into 4 age-balanced groups (2x treatment, 2x control) of 5 individuals. Each group grazed a separate paddock during 4 periods of 21, 14, 14, and 7 days. All paddocks were conventionally fenced and of equal size. Within the paddocks of the treatment groups, a straight virtual boundary was set. For 59 days, GPS collars (Nofence, Batnfjordsøra, Norway) tracked the cow’s location per min and any interaction with the virtual boundary. Milk samples were collected individually at the beginning, middle and end of each period to determine milk cortisol levels. The total number of stimuli per cow decreased over time, with the number of audio tones (AT) far exceeding the number of electric pulses (EP) in each period (mean AT:EP of 13.8). Total EP decreased from 51 in the first period to 0 in the last period. A Linear Mixed-Effects Model revealed that cortisol of control (n=10, mean±SD: 0.74±0.48) and treatment (n=8, mean±SD: 0.71±0.40) groups did not significantly differ (p=0.7131) at activating the virtual boundary, but decreased over (learning-) time (p<.001**). Cows were able to learn a virtual fencing system and could successfully be kept in their assigned area. Cortisol levels indicate that there were no acute welfare implications associated with this technology.