Exposure to a farming environment protects individuals from respiratory allergy. The timing and duration of exposure seem to play critical roles. The largest reduction in risk of developing respiratory allergies is seen among those who are exposed prenatally and continuously thereafter. Contact with farm animals, at least in childhood, likely confers protection; other factors have not been completely identified. Also, the consumption of milk directly from the farm during childhood has been shown to be beneficial with respect to childhood asthma and allergies. Increased levels of microbial substances may contribute to the protective effects. The mechanisms by which such environmental exposures confer protection from respiratory allergies are not well understood. A number of gene-by-environment interactions have been observed with polymorphisms in genes of innate immunity receptors and exposure to farming environments. Increased levels of microbial exposures recognized by innate immune responses may affect adaptive immune responses resulting in decreased levels of atopic sensitization and asthma.