In the early history of vitamin D research most of the studies on its chemistry and function were performed with vitamin D2 which was readily obtained by UV irradiation of ergosterol from yeast. Yet, in the physiological economy of vitamin D for most vertebrates, including humans, fish and especially for birds, vitamin D3 produced in skin by solar irradiation of 7-dehydrocholesterol, is the natural form of vitamin D. Vitamin D2, as a dietary supplement, while of comparable potency to vitamin D3 in most mammals, has been found in nature only when ergosterol in fungi is inadvertently exposed to solar UV radiation. Nevertheless, some herbivorous animals, horses and elephants, seem to maintain adequate vitamin D status with vitamin D2 rather than vitamin D3. The source of that vitamin D2 has been assumed to be the traces derived from ergosterol in endophytic fungi exposed to the sun on grass being consumed. However, outdoor grazing sheep in winter maintained adequate vitamin D status with vitamin D2, yet no vitamin D2 could be detected on the grass they were consuming. Bovine rumen contents, fermenting in an artificial rumen, had an increase in vitamin D2 concentration, particularly when cellulose fibre was added as a fermentation substrate. Furthermore, mice being raised from weaning on a vitamin D-free diet had vitamin D2 in their colon contents. This review examines anaerobic microbial production of vitamin D2 in the alimentary tract, in the dark, and describes a natural function for vitamin D2 in microorganisms and potentially for gut health.