Limiting exposure to sunlight can help treat cutaneous porphyria. Avoid direct contact with sunlight when possible. Wearing long sleeves and a hat can help protect your skin. Use sunscreen when you go outside.