You might have heard that catching some rays is good for your health. Aside from observed mental and emotional benefits of sunlight, there is some truth to this belief.

Vitamin D is a key nutrient that, strictly speaking, the human body cannot make on its own. However, the body can produce it with the help of ultraviolet B (UVB) rays from the sun. When this type of radiation hits the skin, cholesterol in our skin cells undergoes a series of chemical reactions that lead to the release of vitamin D into the body, explains Yale Medicine.

Vitamin D: What It Does and Why We Need It

Vitamin D helps regulate calcium levels in the body, supporting your bones, teeth, and muscles. Deficiency of this nutrient can result in compromised immune systems (and lower ability to fight infections), weaker bones and hair, muscle aches and pains, and fatigue. Lack of vitamin D can also lead to earlier osteoporosis as you age.

Unfortunately, it's proven that the same UV rays which help our body produce vitamin D also cause mutations in our DNA. Such DNA mutations are what lead to the formation of skin cancer. In fact, the World Health Organization officially classifies both UVA and UVB rays as carcinogenic to humans.

Do We Face a Health Dilemma?

The best way to protect yourself from skin cancer is to avoid excessive sun exposure and wear a broad-spectrum SPF 30+ sunscreen every day, reapplying diligently when spending a day outside.

Avoiding the sun during peak hours and wearing a broad-spectrum sunscreen aren't the only ways to prevent eventual DNA mutations from cumulative, life-long sun exposure. Dermatologists recommend wearing sun-protective clothing and hats for more coverage if possiblle—as an added bonus they can keep you cooler!

"But wait," you might be thinking, "does sunscreen block vitamin D?"

On the surface, it seems that we're forced to pick between two evils: possible skin cancer or the health problems that come with low vitamin D levels. How are we supposed to choose sun safety over the health of multiple bodily functions or vice versa?

According to the research, the issue isn't so black and white. While a few experimental studies found sunscreen to prevents vitamin D from being formed in the skin, prevailing medical opinions hold that is not true. Real-world observational studies on people exposed to moderate amounts of natural sunlight have not found any proof that sunscreen use lowers vitamin D levels.

An Easy Solution

The good news is that it's easy to get the necessary vitamin D from alternate sources.

You can—and likely already do—obtain it from foods you eat every day. For example, cheese, egg yolks, tuna, and salmon (wild-caught more than farm-raised) all contain vitamin D naturally. Even milk and fruit juices are often fortified with vitamin D. Further, you can get vitamin D from a daily multivitamin or even a weekly supplement. If you're concerned about vitamin D or any supplement, talk to your doctor for advice.

All that said, you can certainly get your vitamin D without having to lay in the sun and incur skin damage. Dermatologists will tell you that the goal is to protect yourself from the sun's UV radiation with clothing and daily sunscreen while keeping to a nutritious balanced diet. So, grab your sun care products, keep an eye on what you eat, and rest assured you will get all the vitamin D you need!