Introduction: Staphylococcus aureus (S.aureus) is an important foodborne pathogen worldwide and one of the most causes of food poisoning in dairy products. Therefore, this study aimed to study the genotype of the coagulase gene, distribution of putative virulence factors and antibiotic resistance genes of S.aureus strains isolated from raw milk and dairy products. Material and methods: In this cross-sectional study, 240 samples of raw milk traditional dairy products were collected in Shahrekord, Iran and was used to identify S.aureus by biochemical tests and PCR. Biofilm assays and Kirby–Bauer disc diffusion method were performed. Genes were detected by PCR and coagulase gene (coa gene) polymorphism was detected by RFLP. Results: Among milk and dairy product samples, 28.88% and 12.66% were positive for S. aureus, respectively. Amplification of the coagulase gene showed 18 strains have three bands: 320, 490, and 160 bp (genotype I) and 16 strains have two bands: 490 and 240 bp (genotype VIII). Most of the isolates were resistant to penicillin G (91.11%), ampicillin (66.66%) and oxacillin (55.55%). There was a significant relationship between biofilm formation and antibiotic resistance in S. aureus isolates (p<0.05). There was a significant relationship between the frequency of virulence genes and biofilm production in milk and dairy products (p<0.05). Conclusion: The results showed that a large percentage of milk and dairy product samples were infected with S. aureus and infected samples were highly resistant to antibiotics. There was a relationship between biofilm production and gene virulence and antibiotic resistance.