The mechanism underlying the allergy-protective effects of raw cow’s milk is still unknown, but the modulation of the gut microbiome may play a role. The effects of consuming raw cow’s milk or processed milk on fecal microbial communities were therefore characterized in an experimental murine model. C3H/HeOuJ mice were treated with raw milk, pasteurized milk, skimmed raw milk, pasteurized milk supplemented with alkaline phosphatase (ALP), or phosphate-buffered saline (PBS) for eight days prior to sensitization and challenge with ovalbumin (OVA). Fecal samples were collected after milk exposure and after OVA sensitization, and microbiomes were characterized using 16S ribosomal RNA gene amplicon sequencing. Treatment with raw milk prior to OVA sensitization increased the relative abundance of putative butyrate-producing bacteria from the taxa Lachnospiraceae UCG-001, Lachnospiraceae UCG-008, and Ruminiclostridium 5 (Clostridial clusters XIVa and IV), while it decreased the relative abundance of Proteobacterial genera such as Parasutterella, a putative pro-inflammatory bacterial genus. This effect was observed after eight days of raw milk exposure and became more pronounced five weeks later, after allergic sensitization in the absence of milk. Similar trends were observed after treatment with skimmed raw milk. Conversely, the feeding of pasteurized milk led to a loss of allergy protection and a putative dysbiotic microbiome. The addition of ALP to pasteurized milk restored the protective effect observed with raw milk and mitigated some of the microbial community alterations associated with milk pasteurization. Raw milk-induced protection against food allergic symptoms in mice is accompanied by an increased relative abundance of putative butyrate-producing Clostridiales and a decreased relative abundance of putative pro-inflammatory Proteobacteria. Given the safety concerns regarding raw milk consumption, this knowledge is key for the development of new, microbiologically safe, preventive strategies to reduce the incidence of allergic diseases.