To prevent herpes you have to be very attentive and careful all the time. First of all don't contact with ill people. That means that you shouldn't have any skin to skin contact with people who have herpes.
Generally it is considered that oral herpes and genital herpes can't be transmitted through the items of personal hygiene, such as soap or towels etc. The virus of herpes can't stay active and alive very long when it is not in a human's body. Nevertheless no one can guarantee100% that if you use a towel right after an infected person, you won't get the virus. So be careful.
To prevent oral herpes you have to avoid kissing a person who has herpes virus in lips. You also should not kiss this person in any other areas of the face which are affected by herpes virus. Avoid touching the blisters and sores.
To prevent genital herpes you have to avoid oral sex with an infected person. Those couples, who have already experienced genital herpes, say that it's better to use condoms when the infection has been detected. Between the outbreaks it's better to protect yourself with a condom or any other reliable kind of protection.
However remember that condom cannot prevent herpes very reliably as it may not cover all the infected area. That's why you have to think over all the pros and cons of having sex while one of the partners is infected by herpes virus.
It has been proven that if all necessary precaution measures are taken, you are out of danger of getting genital herpes. Of course, the doctors recommend stopping sexual intercourse while the active phase of genital herpes at all, that way you'll prevent herpes 100%. It means that when the first symptoms of the herpes have just appeared, for example, tingling, burning, reddish skin, you have to avoid sex till the sores will be completely healed.
Moreover, if during the healing period you have sex, this might increase the amount of time, needed to treat herpes. Besides, if you have herpes, sex might be very painful for you, especially if the diseases attacked genitals.
To prevent herpes and to decrease the risk of passing it to your body from a partner, you have to use enough of lubrication, as micro breaks in the skin may absorb the virus quickly (we are talking about the micro breaks that are caused by the small amount of lubrication).
Don't become nervous, avoid stress, and take good care of yourself, because usually herpes attacks those people, whose body is weakened by some negative influences of the environment!