Staphylococcus aureus is one of the major pathogens causing bovine mastitis and foodborne diseases associated with dairy products. To determine the genetic relationships between human and bovine or bovine isolates of S. aureus, various molecular methods have been used. Previously we developed an rpoB sequence typing (RSTing) method for molecular differentiation of S. aureus isolates and identification of RpoB-related antibiotic resistance. In this study, we performed spa typing and RSTing with 84 isolates from mastitic cows (22 farms, 72 cows, and 84 udders) and developed a molecular prophage typing (mPPTing) method for molecular epidemiological analysis of bovine mastitis. To compare the results, human isolates from patients (n = 14) and GenBank (n = 166) were used for real and in silico RSTing and mPPTing, respectively. Based on the results, RST10-2 and RST4-1 were the most common rpoB sequence types (RSTs) in cows and humans, respectively, and most isolates from cows and humans clearly differed. Antibiotic resistance-related RSTs were not detected in the cow isolates. A single dominant prophage type and gradual evolution through prophage acquisition were apparent in most of the tested farms. Thus, RSTing and mPPTing are informative, simple, and economic methods for molecular epidemiological analysis of S. aureus infections.