Even on cloudy days, try to spend 15-20 minutes outside around midday. This is when the sun is strongest. Make sure that at least a quarter of your skin, like your face, arms, and hands, gets some sunlight.
Fish like salmon, mackerel, and sardines are really good for giving you vitamin D. Certain foods, like milk, yogurt, orange juice, and some cereals, have extra vitamin D added to them to make them even healthier. If you're a vegan or vegetarian, you can eat mushrooms like portobello and shiitake that have extra vitamin D added to them.
If you don't get much sun and might not have enough vitamin D, especially if you could be low on it, talk to your doctor about taking vitamin D supplements.
Special lamps called light therapy lamps can be useful. They give off rays like sunlight that can help increase your vitamin D. Before using a light therapy lamp, talk to your doctor, especially if you have some health issues.
Keep track of how much vitamin D you get from food and supplements. Be sure to check your vitamin D levels often, especially if you're concerned about not getting enough vitamin D.