The G protein-coupled melanocortin-1 receptor (MC1R) mediates melanin production, which protects the skin from UV radiation. However, almost all red-haired individuals have a variant of MC1R with reduced or absent signalling capacity and are therefore at higher risk of developing melanomas. Chen et al. report that palmitate enhances downstream MC1R signalling in cells that express variants of the protein that are associated with red hair. Palmitate increased MC1R palmitoylation, which promoted interaction of the receptor with the cell membrane. Treatment of MC1R-variant mice with palmostatin B (a small molecule that enhances palmitoylation) before UV treatment delayed and reduced melanoma incidence.