Do-it-yourself sunscreen is trending on social media and popular websites, but dermatologists warn the homemade potions can be a risky recipe for trouble.

A quick Internet search turns up plenty of how-to videos claiming to have the formula for sun protection.

But dermatologists, including Dr. Jessica Krant, said they are a bad idea.

“You’re at risk for sunburn in the short term. But in the long term, you’re really at risk for skin cancer,” Krant said.

Do-it-yourselfers generally have no way to test the effectiveness of the mixture.

“You have no quality control,” Consumer Reports health editor Trisha Calvo said. “You can’t determine what the SPF of the product is. You don’t even know if those ingredients have any kind of SPF protection.”

Zinc oxide is one of the ingredients in some homemade sunscreens. The mineral protects skin by deflecting the sun’s UV rays rather than absorbing them the way chemical-based sunscreens do. Zinc oxide is found in many mineral-based sunscreens sold in stores.

“In Consumer Reports’ tests of store-bought sunscreens, the ones that contain zinc oxide or titanium dioxide, or both, as active ingredients, have been consistently found to be less effective than those that contain the chemically active ingredients,” Calvo said.

Effectiveness is key for sunscreens.

“In childhood, one single blistering sunburn can increase the risk of skin cancer by 50 percent,” Krant said.

To protect yourself from the sun’s harmful rays, Krant suggests not only using sunscreen but applying common -sense strategies like avoiding midday sun, wearing protective fabrics and clothing, wearing hats and sunglasses.