A ‘natural sunscreen’ gene in skin was found by scientists investigating concentrations of vitamin D.