The best way to prevent or catch herpes is by using dental dams or condoms during vaginal, anal, or oral sex. You also need to ensure that you and your partner take his/her medicines daily so that they can lower the chances of spreading. Moreover, you should avoid having sex even if it is protected sex during a herpes outbreak.