Avoiding sexually transmitted infections comes down to a layered approach: barrier methods, vaccines, regular testing, honest communication with partners, and in some cases, preventive medication. No single strategy is perfect on its own, but combining several of them dramatically lowers your risk.
Condoms Are the Foundation
External (male) condoms, when used correctly every time, are about 98% effective at preventing pregnancy and significantly reduce the transmission of most STIs, including HIV, chlamydia, and gonorrhea. In real-world use, where mistakes like incorrect application or inconsistent use come into play, effectiveness drops to around 87%. That gap matters. Using a condom only “most of the time” is measurably less protective than using one every time.
Internal (female) condoms offer a similar level of protection and give the receptive partner more control over barrier use. Either type works. The key is correct, consistent use: check the expiration date, use water-based or silicone-based lubricant (oil-based products degrade latex), and use a new condom for each act of sex.
One important limitation: condoms don’t cover all skin. Herpes (HSV) and HPV spread through skin-to-skin contact, so transmission can happen even with perfect condom use. Condoms still reduce the risk for these infections, but they can’t eliminate it entirely.
Vaccines That Prevent STIs
Two vaccines directly prevent sexually transmitted infections, and both are most effective when given before exposure.
The HPV vaccine protects against the strains of human papillomavirus responsible for most cervical cancers, genital warts, and several other cancers. The CDC recommends it at age 11 or 12, though it can be started as early as 9. If you missed it as a kid, it’s recommended through age 26, and adults up to 45 can still get it on a three-dose schedule. Children who start between ages 9 and 14 only need two doses, spaced 6 to 12 months apart. Those starting at 15 or older need three doses over six months.
The hepatitis B vaccine is routinely given in infancy but is available to unvaccinated adults at any age. Hepatitis B is transmitted through sexual contact, and chronic infection can lead to liver disease. If you weren’t vaccinated as a child and are sexually active, it’s worth catching up.
PrEP for HIV Prevention
Pre-exposure prophylaxis (PrEP) is a prescription medication taken by HIV-negative people to prevent infection. When taken as prescribed, it greatly reduces the chance of getting HIV from sex or injection drug use.
The timeline to full protection depends on the type of exposure. For receptive anal sex, PrEP pills reach maximum protection after about 7 days of daily use. For receptive vaginal sex or injection drug use, it takes about 21 days. Consistency is critical: if you skip doses, there may not be enough medication in your bloodstream to block the virus. PrEP is available as a daily pill or, in some formulations, as a long-acting injection for people who prefer not to take a daily medication.
PrEP only protects against HIV. It does nothing for chlamydia, gonorrhea, syphilis, or other infections, so it works best as part of a broader prevention strategy that includes condoms and testing.
Post-Exposure Options for Bacterial STIs
In 2024, the CDC issued guidelines for a newer prevention tool: doxycycline post-exposure prophylaxis, sometimes called doxy-PEP. This is a single 200 mg dose of an antibiotic taken as soon as possible after unprotected oral, vaginal, or anal sex, and no later than 72 hours afterward. You should not exceed 200 mg in any 24-hour period.
Doxy-PEP is currently recommended for specific populations at higher risk of bacterial STIs, particularly men who have sex with men and transgender women with a history of bacterial STIs in the past year. It’s designed to prevent chlamydia, gonorrhea, and syphilis after a known exposure. This isn’t something you’d take routinely in place of other prevention methods. It’s a backup layer, similar in concept to emergency contraception.
Testing Catches What Prevention Misses
Many STIs cause no symptoms at all, especially in the early stages. Chlamydia and gonorrhea are frequently silent. Someone can carry and transmit an infection for months without knowing it. Regular screening is the only way to find and treat these infections before they cause complications or spread to partners.
The CDC recommends the following baseline screening schedule:
- Everyone ages 13 to 64 should be tested for HIV at least once in their lifetime.
- Sexually active women under 25 should be tested for gonorrhea and chlamydia every year. Women 25 and older should test annually if they have new partners, multiple partners, or a partner with an STI.
- Men who have sex with men should be tested for syphilis, chlamydia, and gonorrhea at least once a year. Those with multiple or anonymous partners should test every 3 to 6 months. HIV testing should happen at least annually, with more frequent testing (every 3 to 6 months) for those at higher risk.
- Anyone who shares injection drug equipment should get tested for HIV at least once a year.
If you’ve had a specific exposure and want to get tested, keep in mind that most STI tests aren’t accurate the day after contact. Each infection has a window period before it shows up on a test. Testing too early can produce a false negative. Your provider can help you time the test correctly based on when the exposure happened.
Talking to Partners Before Sex
Having a conversation about sexual health before sex is one of the most effective and most skipped prevention steps. The goal isn’t a formal interrogation. It’s a quick, honest exchange that lets both people make informed choices.
A few things worth covering: when each of you was last tested, how many current partners you have, and whether either of you has a known infection. If someone is being treated for an STI, that’s important to share even if they’re on medication. Asking about testing history also normalizes the idea of getting tested together, which removes the awkwardness of bringing it up later.
Being nonjudgmental in these conversations makes them more likely to actually happen again. If a partner reacts defensively or refuses to discuss it, that’s useful information too.
Reducing Reinfection Risk
Getting treated for an STI doesn’t help much if your partner still carries the same infection and passes it back to you. This is one of the most common reasons people test positive again shortly after treatment.
Expedited Partner Therapy (EPT) is a strategy where your healthcare provider gives you medication or a prescription to pass along to your sexual partner so they can be treated without a separate office visit. Studies show that patients whose partners received EPT were 29% less likely to be reinfected compared to those who simply told their partners to go see a doctor on their own. EPT is legal in most U.S. states, though rules vary.
Whether or not EPT is available to you, notifying recent partners after a positive test is one of the most practical things you can do to protect both your own health and theirs. Many health departments also offer anonymous partner notification services if you’d prefer not to make the call yourself.
Layering Methods for Stronger Protection
No single prevention method covers every infection in every scenario. Condoms are excellent for HIV, chlamydia, and gonorrhea but less reliable against herpes and HPV. Vaccines handle HPV and hepatitis B but nothing else. PrEP targets HIV alone. Testing catches infections early but doesn’t prevent them.
The most effective approach stacks several of these together based on your situation. Someone with multiple partners might combine condoms, PrEP, the HPV vaccine, and quarterly STI screening. Someone in a long-term relationship might rely on mutual testing and honest communication. The right combination depends on your sexual activity, your partners, and the specific risks you face. What matters is that you’re using more than one layer.

