There are several ways to prevent getting or transmitting HIV through sex.
If you are HIV negative, you can use HIV prevention medications known as pre-exposure prophylaxis (PrEP) or post-exposure prophylaxis (PEP) to protect yourself. You can also use other HIV prevention methods, below.
If you are living with HIV, the most important thing you can do to prevent transmission and stay healthy is to take your HIV medication (known as antiretroviral therapy or ART), every day, exactly as prescribed. People living with HIV who take HIV medication daily as prescribed and get and keep an undetectable viral load have effectively no risk of sexually transmitting HIV to their HIV-negative partners. There also are other options to choose from, below.
How Can You Prevent Getting HIV from Anal or Vaginal Sex?
If you are HIV-negative, you have several options for protecting yourself from HIV. The more of these actions you take, the safer you can be.
- Use condoms. Condoms are highly effective at preventing HIV infection if you use them the right way every time you have sex. Learn the right way to use a male condom and a female condom.
- Reduce your number of sexual partners. This can lower your chances of having a partner who could transmit HIV to you. The more partners you have, the more likely you are to have a partner with HIV whose viral load is not suppressed or to have a sex partner with a sexually transmitted disease. Both of these factors can increase the risk of HIV transmission.
- Talk to your doctor about PrEP. Pre-exposure prophylaxis (PrEP) is daily medication that can reduce your chance of getting HIV. Taken every day, PrEP can stop HIV from taking hold and spreading throughout your body. PrEP might benefit you if you are HIV-negative and have an ongoing relationship with an HIV-positive partner PrEP also should be considered if you aren’t in a mutually monogamous relationship with a partner who recently tested HIV-negative, and you are a:
- gay or bisexual man who has had anal sex without a condom or been diagnosed with an STD in the past 6 months;
- man who has sex with both men and women; or
- heterosexual man or woman who does not regularly use condoms during sex with partners of unknown HIV status who are at very high risk of HIV infection (for example, people who inject drugs or women who have bisexual male partners).
- Take PEP within 72 hours after a possible HIV exposure. Post-exposure prophylaxis (PEP) means taking HIV medication after being potentially exposed to HIV to prevent becoming infected. If you’re HIV-negative or don’t know your HIV status and think you have recently been exposed to HIV during sex (for example, if the condom breaks), talk to your health care provider or an emergency room doctor about PEP right away (within 3 days). The sooner you start PEP, the better; every hour counts. If you’re prescribed PEP, you’ll need to take it once or twice daily for 28 days. Keep in mind that your chance of getting HIV is lower if your HIV-positive partner is taking HIV medication daily prescribed and his or her viral load is undetectable.
- Get tested and treated for other STDs and encourage your partners to do the same. If you are sexually active, get tested at least once a year. Having other STDs increases your risk for getting or transmitting HIV. STDs can also have long-term health consequences. Find an STD testing site.
- If you’re HIV-negative and your partner is HIV-positive, encourage your partner to get and stay on HIV treatment. If taken daily as prescribed, HIV medication (ART) reduces the amount of HIV in the blood (the viral load) to a very low levels—so low that a standard lab test can’t detect it. This is called having an undetectable viral load. People living with HIV who take HIV medication daily as prescribed and get and keep an undetectable viral load can stay healthy and have effectively no risk of sexually transmitting HIV to an HIV-negative partner through sex.
- Choose less risky sexual behaviors. HIV is mainly spread by having anal or vaginal sex without a condom or without taking medicines to prevent or treat HIV. Here is some information about the risk associated with specific sexual behaviors. See CDC’s HIV Risk Reduction Tool (BETA) for more information.
- Receptive anal sex is the riskiest type of sex for getting HIV. It’s possible for either partner—the partner inserting the penis in the anus (the top) or the partner receiving the penis (the bottom)—to get HIV, but it is much riskier for an HIV-negative partner to be the receptive partner. That’s because the lining of the rectum is thin and may allow HIV to enter the body during anal sex.
- Vaginal sex also carries a risk for getting HIV, though it is less risky than receptive anal sex. Most women who get HIV get it from vaginal sex, but men can also get HIV from vaginal sex.
- In general, there is little to no risk of getting or transmitting HIV from oral sex. Theoretically, transmission of HIV is possible if an HIV-positive man ejaculates in his partner’s mouth during oral sex. However, the risk is still very low, and much lower than with anal or vaginal sex. Factors that may increase the risk of transmitting HIV through oral sex are oral ulcers, bleeding gums, genital sores, and the presence of other STDs, which may or may not be visible. For more information, see CDC’s HIV Basics: How can I prevent getting HIV from oral sex?
- Sexual activities that don’t involve contact with body fluids (semen, vaginal fluid, or blood) carry no risk of HIV transmission but may pose a risk for other STDs.
Is Abstinence an Effective Way to Prevent HIV?
Yes. Abstinence means not having oral, vaginal, or anal sex. An abstinent person is someone who’s never had sex or someone who’s had sex but has decided not to continue having sex for some period of time. Abstinence is the only 100% effective way to prevent HIV, other sexually transmitted diseases (STDs), and pregnancy. The longer you wait to start having oral, vaginal, or anal sex, the fewer sexual partners you are likely to have in your lifetime. Having fewer partners lowers your chances of having sex with someone who has HIV or another STD.
If You Are Living with HIV, How Can You Prevent Passing It to Others?
If you are living with HIV, there are many actions you can take to prevent transmitting HIV to an HIV-negative partner. The more of these actions you take, the safer you can be.
- Take HIV medication. The most important thing you can do is to take medication to treat HIV infection (called antiretroviral therapy, or ART) every day, exactly as prescribed. Taking HIV medication daily as prescribed can make the amount of HIV in your blood (your viral load) very low—so low that a standard lab test can’t detect it. This is called having an undetectable viral load. Getting and keeping an undetectable viral load is the best thing you can do to stay healthy. If your viral load stays undetectable, you have effectively no risk of transmitting HIV to an HIV-negative partner through sex. Learn more about HIV treatment as prevention.
- If you’re taking HIV medication, follow your health care provider’s advice. Visit your health care provider regularly and always take your medication as prescribed.
- Use condoms the right way every time you have sex. Learn the right way to use a male condom and a female condom.
- Choose less risky sexual behaviors. Anal sex is the highest-risk sexual activity for HIV transmission. If your partner is HIV-negative, it’s less risky if they’re the insertive partner (top) and you’re the receptive partner (bottom) during anal sex. Oral sex is much less risky than anal or vaginal sex. Sexual activities that don’t involve contact with body fluids (semen, vaginal fluid, or blood) carry no risk of HIV transmission.
- If you inject drugs, never share your needles or works with anyone.
- Talk to your HIV-negative partners about PrEP. Pre-exposure prophylaxis (PrEP) is daily medication that can reduce an HIV-negative person’s chance of getting HIV. Taken every day, PrEP can stop HIV from taking hold and spreading throughout throughout the person’s body.
- Talk to your HIV-negative partners about post-exposure prophylaxis (PEP) if you think they’ve recently had a possible exposure to HIV (for example, if they had anal or vaginal sex without a condom or if the condom broke during sex). Your partners should talk to a health care provider right away (within 72 hours) after a possible exposure. Starting PEP immediately and taking it daily for 28 days will reduce their chance of getting HIV.
- Get tested and treated for other STDs and encourage your partners to do the same. If you are sexually active, get tested at least once a year. STDs can have long-term health consequences. They can also increase the risk of getting or transmitting HIV. Find an STD testing site.
Also, encourage your partners who are HIV-negative to get tested for HIV so they are sure about their status and can take action to keep themselves healthy. Use HIV.gov’s HIV Testing Sites & Care Services Locator to find a testing site nearby.
Learn more by visiting CDC’s HIV Prevention Basics. You can also get information on how to protect yourself and your partner that is tailored to meet your needs from CDC’s HIV Risk Reduction Tool (BETA).