How to Prevent STIs: Condoms, Vaccines, and PrEP

Preventing sexually transmitted infections comes down to a layered approach: using barriers consistently, getting vaccinated, testing regularly, and in some cases, taking preventive medication. No single method eliminates all risk, but combining several of them dramatically lowers your chances of getting or passing on an infection.

Condoms Are the Foundation

External (male) condoms remain the most accessible and well-studied form of STI protection. They reduce HIV transmission by approximately 85% with consistent, correct use and offer over 90% protection against gonorrhea. For chlamydia, the protection range is broader, falling between 50% and 90% depending on the study. Internal (female) condoms work on the same principle, creating a physical barrier that blocks infectious fluids.

The key phrase in every study is “consistent and correct use.” That means a new condom for every act of sex, put on before any genital contact, with no oil-based products anywhere near it. Baby oil, petroleum jelly, coconut oil, body lotion, and even some burn ointments all degrade latex, weakening the condom and raising the chance of breakage. Water-based lubricants are safe with all condom types. One lab study found that water-based products actually strengthened latex, while mineral oil and oil-based lubricants decreased puncture resistance. Silicone-based lubricants are also generally compatible with latex, though you should check the condom packaging to confirm.

What Condoms Don’t Fully Cover

Condoms work best against infections carried in bodily fluids, like HIV and gonorrhea. They’re less effective against infections spread through skin-to-skin contact, including herpes and syphilis, because these can be transmitted from areas a condom doesn’t cover. Syphilis, for example, spreads from an open sore or flat lesion that may sit on the inner thigh, scrotum, or pubic area. A condom protects only if it completely covers the infected spot. Mathematical modeling shows that condom effectiveness against syphilis decreases as the number of sexual exposures increases, precisely because of this coverage limitation.

HPV follows a similar pattern. The virus lives in skin cells around the entire genital region, so condoms reduce but don’t eliminate transmission. This is one reason vaccination matters so much for HPV prevention.

Vaccines That Prevent STIs

Two vaccines directly prevent sexually transmitted infections, and both are highly effective.

The hepatitis B vaccine is recommended for all infants, unvaccinated children under 19, and all adults aged 19 to 59. Adults 60 and older with risk factors should also be vaccinated. Depending on the specific vaccine product, you’ll need either two or three doses. Immunity lasts at least 30 years when vaccination begins in infancy, and the vaccine is considered highly effective at preventing infection.

The HPV vaccine protects against the strains of human papillomavirus most likely to cause genital warts and cancers of the cervix, throat, anus, and penis. It’s recommended for everyone starting at age 11 or 12, with catch-up vaccination available through age 26. Some adults between 27 and 45 may also benefit after discussing it with a provider. The vaccine is most effective when given before any exposure to the virus, which is why the recommended age is so young.

PrEP for HIV Prevention

Pre-exposure prophylaxis, or PrEP, is medication taken by HIV-negative people to prevent infection. There are two forms: a daily oral pill and a long-acting injection given every two months.

Both are highly effective, but the injectable version has proven superior. In a major clinical trial, HIV infection occurred in 0.57% of people receiving the injection compared to 1.7% of those on the daily pill. The trial was stopped early because the injectable form was so clearly better. For people who have trouble remembering a daily pill, the injection removes that variable entirely.

PrEP only prevents HIV. It does nothing for gonorrhea, chlamydia, syphilis, or other infections, which is why it works best as part of a broader prevention strategy that includes condoms and regular testing.

Doxy-PEP: A Newer Option for Bacterial STIs

In 2024, the CDC issued guidelines for using doxycycline as post-exposure prophylaxis (doxy-PEP) against bacterial STIs. This is an antibiotic you take after sex rather than before it. The recommended dose is 200 mg, taken as soon as possible within 72 hours of oral, vaginal, or anal sex, with a maximum of 200 mg in any 24-hour period.

The current recommendation is specific: doxy-PEP is intended for men who have sex with men and transgender women who have been diagnosed with syphilis, chlamydia, or gonorrhea within the past 12 months. It’s not yet broadly recommended for all populations. If prescribed, your provider will reassess whether you still need it every 3 to 6 months.

Protection During Oral Sex

Oral sex carries a lower risk than vaginal or anal sex for most infections, but it’s not risk-free. Gonorrhea, syphilis, herpes, and HPV can all be transmitted through oral contact. Using an external condom during oral sex on a penis, or a dental dam during oral sex on a vulva or anus, creates a barrier.

Research on dental dams specifically is limited. No study has yet shown a statistically significant reduction in STI transmission from dental dam use alone, largely because so few people use them consistently enough to generate good data. That said, the barrier principle is the same as a condom, and researchers generally expect similar protective effects. If you don’t have a dental dam, cutting open an external condom and laying it flat works as a substitute.

Why Regular Testing Matters

More than half of chlamydia, gonorrhea, and trichomoniasis infections in women produce no symptoms at all. One large meta-analysis found that roughly 61% of chlamydia infections, 53% of gonorrhea infections, and 57% of trichomoniasis infections were completely asymptomatic. People who feel fine can unknowingly pass infections to partners for weeks or months. This is why testing on a schedule, not just when something feels wrong, is critical.

The CDC’s screening recommendations break down by age, sex, and risk level:

  • Chlamydia and gonorrhea: Annual screening for all sexually active women under 25, and for women 25 and older with risk factors. Men who have sex with men should screen at least annually, or every 3 to 6 months if at higher risk.
  • Syphilis: At least annual screening for men who have sex with men, with more frequent testing (every 3 to 6 months) for those at increased risk.
  • HIV: At least one screening test for all adults aged 13 to 64. Annual or more frequent testing for men who have sex with men and others with ongoing risk factors.
  • Hepatitis C: At least one screening test for all adults over 18.

If you’re living with HIV, the recommendation is to screen for chlamydia, gonorrhea, and syphilis at your first evaluation and at least once a year after that.

Getting Partners Treated

Prevention breaks down if you’re treated for an infection but your partner isn’t. Reinfection from an untreated partner is one of the most common reasons people test positive again shortly after treatment. Having a direct conversation with sexual partners after a positive test is one of the most effective things you can do to stop the cycle.

If that conversation feels difficult, or if you can’t reach a partner easily, expedited partner therapy (EPT) is an option in 48 states plus Washington, D.C. EPT allows your provider to prescribe or provide medication for your partner without requiring them to come in for their own appointment. It’s designed for situations where a partner might not otherwise get treated.

Layering Methods for Better Protection

No single prevention tool covers everything. Condoms are excellent for HIV and gonorrhea but less reliable for herpes and syphilis. Vaccines cover HPV and hepatitis B but nothing else. PrEP handles HIV but not bacterial infections. The strongest protection comes from combining several approaches: using condoms consistently, staying up to date on vaccines, testing on the recommended schedule, and adding PrEP or doxy-PEP if your risk profile calls for it. Each layer you add closes a gap that another method leaves open.