As of 2017, there is not currently a herpes vaccine available to prevent HSV-1 or HSV-2. (There is a vaccine available for another virus, herpes zoster; however, despite the similar name, it actually refers to the shingles virus. And, in fact, shingles occurs due to the reactivation of yet another virus, varicella zoster, which causes chicken pox.)
Doctors prescribe suppressive treatment if a person experiences more than six recurrences in a year. In some cases, a doctor my recommend that the individual takes daily antiviral treatment indefinitely. The aim here is to prevent further recurrences. Although suppressive treatment significantly reduces the risk of passing HSV to a partner, there is still a risk.