This study is a randomized, double-blind, placebo-controlled, crossover trial. Sixty men who have sex with men (MSM) will be randomized to first receive either valacyclovir, 1 gram once a day, or matching placebo for 8 weeks. After a 2-week washout period during which all participants receive placebo, subjects then switch to the other treatment for the next 8 weeks.