The barrier that's created when you apply oils that don't absorb easily, such as cooking oil or butter, may actually trap heat, worsen the burn, and increase pain. Coconut oil, however, absorbs easily into the skin and is not thought to have negative side effects. Mild sunburns go away without treatment in a few days.