Certain things can activate the herpes virus. These include
UV rays (from natural sunlight or a tanning bed),
very hot or cold temperatures,
damaged or cracked lips, and
physical or emotional stress.
Avoiding these things may lower the risk of getting a cold sore. Sunscreen and good lip care might help too.
People who get cold sores very frequently are sometimes advised to take medication to try to prevent them. But there is hardly any research on how effective this medication is.
Until the cold sore blisters and scabs have completely gone away, you can protect yourself and other people from infection by
not kissing anyone,
not sharing towels, dishes and cutlery,
washing your hands if you touch your lips with them (for example, after putting on cream),
avoiding sports that involve physical contact, and
avoiding oral sex. The herpes virus can spread from the lips to the membranes lining the genitals, leading to genital herpes.
Newborn babies under the age of 8 weeks are particularly at risk because their immune system hasn’t had time to develop. Parents who have a cold sore should take care not to kiss the baby or put the baby’s pacifier in their own mouth. They should also wash their hands regularly and make sure that the baby doesn't accidentally touch their cold sore.
People who have cold sores don’t have to stay home from work or school.
Sometimes people pass the cold sore virus on to others even if they don’t have a cold sore at the time. This very rarely happens, though, so there’s no need to take any precautions if you don't currently have a cold sore.