There are three main sources of vitamin D:
When the skin is exposed to direct sunlight, the body will synthesize vitamin D3. No vitamin D is produced when exposed to indoor sun through a window (as this filters out the sun’s UVB rays).
Vitamin D rich foods
Eating food that contains vitamin D such as salmon, mackerel, tuna, and some mushrooms when these have been exposed to UV light. In some countries, vitamin D2 is also added to certain brands of orange juice, yogurt, cheese, soy beverages, margarine and breakfast cereals.
VItamin D supplements
Taking supplements that contain vitamin D.
Most people who are exposed to a healthy amount of natural sunlight produce around 90% of the bodies vitamin D intake. The rest of the vitamin D needed is absorbed through food rich in supplements. For those who do not get a lot of sunlight or cover up in the sun, a vitamin D supplement can supply a sufficient amount.