Acyclovir (Zovirax) and valacyclovir (Valtrex) are very similar medications that differ mainly in how often one has to take the medication. They are both antiviral medications that are proven safe and effective in preventing herpes outbreaks. Both medications also help prevent spreading herpes to other people.