In conclusion, the results suggested that IPA inhibited S. aureus-induced mastitis through inhibition inflammation and restoring blood-milk barrier by activating AhR. Here, AHR is linked to mastitis.