Even though your body produces vitamin D when you are out in the sun, it is crucial to limit the time of exposure due to an increase in the risk of developing skin cancer.
Follow these tips to help you stay protected against UV rays:

Wear protective clothing.
Wear a hat and sunglasses that block UV rays.
Keep skin hydrated and use sunscreen.
Drink plenty of water.
Limit exposure in direct sunlight during the hours of 10 am to 4 pm.