The modulation of ammonia levels and the targeting of Slc4a11 offer a potential therapeutic strategy for the treatment of mastitis. Here, SLC4A11 is linked to mastitis.