The two ways to get vitamin D are by exposing bare skin to sunlight or by vitamin D supplementation. Sun exposure is not always a reliable way to get vitamin D since it depends on where you live, the time of year and day you are in the sun, your skin color, your age, and how much skin is exposed. Moreover, there is the added risk of skin damage and cancer due to the sun.
A few foods contain vitamin D naturally, while other foods are fortified with vitamin D. It’s hard to get the right amount of vitamin D just from food. Vitamin D3 supplementation is the easiest way to insure adequate levels. Your doctor can suggest a dose for you and order blood tests to confirm that your vitamin D levels are in the target range.