How can herpes be prevented?

The surest way to avoid transmission of sexually transmitted diseases, including genital herpes, is to abstain from sexual contact, or to be in a long-term mutually monogamous relationship with a partner who has been tested and is known to be uninfected.