The best way to avoid herpes or any STI is to not have sex. And since herpes is transmitted by skin-to-skin contact, you can contract herpes even if you don’t have intercourse.
You can protect yourself by using a latex condom every time you have sex. Condoms don’t provide complete protection against herpes, but they can help. Since herpes can be transmitted during oral sex, using condoms or a dental dam during oral sex can also help reduce your risk. Learn more about reducing your risk for STIs.