For medical emergencies, call your local emergency number. This site does not provide medical advice.

How to Prevent STIs: 8 Proven Ways to Protect Yourself and Your Partner

Practical, evidence-based ways to lower your risk of sexually transmitted infections, including condoms, vaccines, regular testing, PrEP and open communication.

By Editorial Team · Updated · 3 min read

Shelves of condoms and sexual health products in a pharmacy
Photo: Tranhoangnam4320 / Wikimedia Commons · CC0

This article is awaiting review by a qualified medical professional.

Quick answer

The most effective ways to prevent STIs are using condoms correctly every time, getting vaccinated against HPV and hepatitis B, testing regularly, and talking openly with partners. Not having sex, or being in a long-term relationship where both partners have tested negative and are only having sex with each other, are the only fully reliable methods.

Sexually transmitted infections (STIs) are common, but most can be prevented. No single method is perfect, so combining several gives the strongest protection. These steps apply to everyone, whatever their age, gender or sexual orientation.

1. Use condoms correctly every time

Condoms (external or internal) are the only method that both prevents pregnancy and reduces the risk of most STIs, including HIV. Use one for vaginal, anal and oral sex, from start to finish, and use a new one each time. See our guide on how to use a condom correctly.

Condoms reduce risk but do not remove it completely, because some infections, such as herpes and HPV, can spread through skin that a condom does not cover.

2. Get vaccinated

Vaccines prevent several serious infections:

  • HPV vaccine: prevents most cancers and genital warts caused by HPV. See who needs the HPV vaccine.
  • Hepatitis B vaccine: recommended for all infants and for adults, particularly those at higher risk.
  • Hepatitis A vaccine: recommended for some groups, including men who have sex with men and people who use drugs.

3. Get tested regularly

Many STIs cause no symptoms, so you can pass one on without knowing. Test when you start a new relationship, between partners, and at least once a year if you have new or multiple partners. Ask a clinician how often you should be screened. Everyone should have an HIV test at least once. See HIV symptoms and testing.

4. Talk openly with your partner

Discuss testing, past infections and protection before having sex. It can feel awkward, but it is a sign of respect and makes it easier to stay safe. Testing together is a good approach.

5. Limit partners and avoid overlapping relationships

Your risk rises with the number of partners, and especially when partners have other partners at the same time. Testing between partners lowers the chance of passing infections on.

6. Use medical prevention where it is suitable

  • PrEP (pre-exposure prophylaxis): medicine that greatly lowers the risk of getting HIV for people at higher risk. See HIV prevention.
  • PEP (post-exposure prophylaxis): HIV medicine started within 72 hours after a possible exposure.
  • Doxycycline after sex (doxy-PEP): in some higher-risk groups, doctors may prescribe a dose within 72 hours after sex to reduce some bacterial STIs. It does not protect against HIV or viral infections, and it is only for people advised to use it by a clinician.

7. Avoid sharing needles and blood-contact items

HIV, hepatitis B and hepatitis C can spread through shared needles and syringes. Never share needles, and avoid sharing razors or other items that may carry blood. Use sterile equipment for tattoos and piercings.

8. Be careful with alcohol and drugs

Alcohol and drugs can affect judgement and make it less likely you will use protection. Plan ahead so that condoms are available.

What does not prevent STIs

  • The contraceptive pill, patch, injection, implant or IUD
  • Withdrawal (pulling out)
  • Washing or urinating after sex
  • Natural (lambskin) condoms, which do not stop viruses such as HIV from passing through
  • Choosing partners who "look healthy", because most infections have no visible signs

When to see a doctor

See a healthcare provider if you have any symptoms, such as unusual discharge, sores, itching, pain when urinating or during sex, or if a partner tells you they have an STI. If you think you were exposed to HIV in the last 72 hours, seek emergency care or a sexual health clinic right away and ask about PEP. Testing and treatment are confidential and there is no shame in seeking them.

Frequently asked questions

What is the best way to prevent STIs?

Using a condom correctly every time you have vaginal, anal or oral sex, combined with vaccination and regular testing, gives the best protection for people who are sexually active.

Can you get an STI from oral sex?

Yes. Infections such as gonorrhea, chlamydia, syphilis, herpes and HPV can be passed on through oral sex. Condoms or dental dams reduce the risk.

Does the birth control pill or withdrawal prevent STIs?

No. Neither the pill nor withdrawal protects against STIs. Only condoms reduce the risk of most infections.

Sources

  1. WHO: Sexually transmitted infections (STIs) fact sheet
  2. CDC: About STIs

This article is for educational purposes only and does not replace advice from a doctor or other qualified health professional. See our medical disclaimer.

Sexual & Reproductive Health

How to Use a Condom Correctly: Step-by-Step Guide

A clear step-by-step guide to using external condoms correctly, choosing the right lubricant and avoiding common mistakes that cause breakage.

Updated 2026-09-21 · 2 min read