The main way to prevent HIV infection is to reduce the risk of exposure to HIV, for instance by having sex without a condom or sharing needles and other injecting equipment.
If you have HIV you can pass it on to others if you have sex without a condom, or share needles, syringes, or other injecting equipment. HIV treatment with ART substantially reduces the risk of passing the virus onto someone else.
Knowing your HIV status and that of your partner is important and if you are at regular risk of potential exposure to HIV you should have a regular HIV test.
Sex
HIV can be transmitted by having vaginal or anal sex without a condom. There is also a risk of transmission through oral sex, but this risk is much lower.
HIV can also be caught from sharing sex toys with someone infected with HIV.
See causes of HIV for more on transmission of HIV.
The best way to prevent HIV and other sexually transmitted infections (STIs) is to use a condom for penetrative sex and a dental dam for oral sex.
Condoms
Condoms come in a variety of colours, textures, materials and flavours. Both male and female condoms are available.
A condom is the most effective form of protection against HIV and other STIs. It can be used for vaginal and anal sex, and for oral sex performed on men.
HIV can be passed on before ejaculation, through pre-come and vaginal secretions, and from the anus.
It is very important that condoms are put on before any sexual contact occurs between the penis, vagina, mouth or anus.
Lubricant
Lubricant, or lube, is often used to enhance sexual pleasure and safety, by adding moisture to either the vagina or anus during sex.
Lubricant can make sex safer by reducing the risk of vaginal or anal tears caused by dryness or friction, and it can also prevent a condom from tearing.
Only water-based lubricant (such as K-Y Jelly) rather than an oil-based lubricant (such as Vaseline or massage and baby oil) should be used with condoms.
Oil-based lubricants weaken the latex in condoms and can cause them to break or tear.
Dental dams
A dental dam is a small sheet of latex that works as a barrier between the mouth and the vagina or anus to reduce the risk of STIs during oral sex.
Find out more about what sexual activities can put you at risk of HIV and other STIs.
Sharing needles and injecting equipment
If you inject drugs, don't share needles or syringes, or other injecting equipment such as spoons and swabs, as this could expose you to HIV and other viruses found in the blood, such as hepatitis C.
Many local authorities and pharmacies offer needle exchange programmes, where used needles can be exchanged for clean ones.
If you are a heroin user, consider enrolling in a methadone programme. Methadone can be taken as a liquid, so it reduces your risk of getting HIV.
A GP or drug counsellor should be able to advise you about both needle exchange programmes and methadone programmes.
If you are having a tattoo or piercing, it's important that a clean, sterilised needle is always used.
Screening for HIV in pregnancy
All pregnant women are offered a blood test to check if they have HIV as part of routine antenatal screening. If untreated, HIV can be passed from a pregnant woman to her baby during pregnancy, birth or breastfeeding. Treatment in pregnancy greatly reduces the risk of passing on HIV to the baby.
Read more about screening for HIV during pregnancy.