To lower your chance of a UTI after sex, pee soon afterwards, drink enough fluids, wash the skin around the vagina gently, and avoid spermicides. If you still get repeated infections after sex, ask a doctor about a single dose of antibiotic taken after intercourse, or vaginal oestrogen if you’re past menopause. Both are recommended in UK guidelines for recurrent UTIs.
Sex-related UTIs are common and they aren’t a sign of poor hygiene or of anything your partner has. Here’s what actually helps, what the evidence says about cranberry and D-mannose, and when a burning feeling needs a doctor the same day.
Why sex can trigger a UTI
Most bladder infections happen when bacteria from the skin around the genitals and back passage get into the urethra, the short tube that carries urine out. During sex, friction and movement can push bacteria towards the urethral opening. People with a vagina have a much shorter urethra than people with a penis, so bacteria have less distance to travel to the bladder.
The CDC lists recent sexual activity as a risk factor, and is clear that a UTI is not a sexually transmitted infection. It also notes that spermicides can change the normal bacteria in the vagina, which may increase risk.
Some people notice a pattern: infections tend to follow sex, especially with a new partner or after a lot of sex in a short time (sometimes called “honeymoon cystitis”). The UK’s NICE guideline on recurrent UTI recognises sexual intercourse as a trigger that some people can identify.
Is it a UTI or something else?
Typical bladder infection symptoms, according to the NHS, include:
- Pain or burning when you pee
- Needing to pee more often or more urgently
- Cloudy urine, or blood in your urine
- Pain low in your tummy
- Feeling tired or generally unwell
Burning after sex isn’t always a UTI. Friction irritation, thrush, bacterial vaginosis and some STIs such as chlamydia can feel similar. If you’ve had a new partner or unprotected sex, it’s worth testing; see how soon you can test for STIs after sex. Vaginal dryness and soreness can also mimic a bladder infection; our guide to common causes of vaginal discomfort covers those.
What helps prevent UTIs after sex
These steps come from the NHS and CDC. None is a guarantee, but they’re cheap, safe and worth doing together.
- Pee soon after sex. Both the NHS and CDC recommend it. The idea is to flush out bacteria before they settle in the bladder. You don’t need to jump up in the first minute, but don’t wait hours either.
- Drink enough fluids during the day. A full bladder that empties regularly gives bacteria less time to multiply.
- Wash gently before and after sex. The NHS suggests washing the skin around the vagina with water before and after sex. Skip douches, sprays and powders, which the CDC advises against.
- Wipe front to back after using the toilet, so bacteria from the bottom aren’t carried forward.
- Avoid spermicides. The NHS advises against spermicidal lube on condoms or with diaphragms. If you use a diaphragm and keep getting UTIs, ask about other contraception.
- Use lubricant if you’re dry. Friction irritates the urethra. A plain water-based lube without spermicide or perfume is a sensible choice.
- Change the order with anal sex. Never go from anal to vaginal contact without washing or changing the condom, since that moves gut bacteria straight to the urethra.
- Don’t hold in pee for long periods, and take your time to empty your bladder fully.
- Choose cotton underwear and avoid scented soaps around the genitals, as the NHS suggests.
Prevention checklist
| When | What to do |
|---|---|
| Through the day | Drink regularly; don’t hold in urine; wear breathable underwear |
| Before sex | Gentle wash with water; have water-based lube ready; skip spermicide |
| During sex | Use lube if dry; wash or change condoms when switching from anal to vaginal sex |
| After sex | Pee within a short time; gentle wash; drink a glass of water |
| If UTIs keep coming back | See a doctor about post-sex antibiotics, vaginal oestrogen or other options |
Does cranberry juice prevent UTIs?
It may help a little in some groups. A 2023 Cochrane review of 50 studies found that cranberry products probably reduce the risk of repeat symptomatic UTIs in women with recurrent infections, with a risk ratio of 0.74 (roughly a quarter fewer infections). It found little or no benefit in pregnant women or in older people living in care homes.
NICE in the UK is more cautious, describing the evidence for cranberry as uncertain and noting no evidence of benefit for older women. A few practical points if you want to try it:
- Cranberry products don’t treat an infection that has already started. The NHS is clear on this.
- Juice drinks can be high in sugar. NICE advises counting that sugar as part of your daily intake.
- If you take warfarin, the NHS says to avoid cranberry products.
- If you’re pregnant, check with your doctor first.
What about D-mannose?
D-mannose is a sugar sold as a powder or tablets for UTI prevention. NICE notes that some non-pregnant women may wish to try it, based on an earlier small study. But a larger, well-run UK trial published in JAMA Internal Medicine in 2024 gave 2 g a day of D-mannose or a placebo powder to women with recurrent UTIs. After 6 months, 51.0% of the D-mannose group and 55.7% of the placebo group had needed care for a suspected UTI, a difference that wasn’t statistically significant. The authors concluded that D-mannose shouldn’t be recommended for prevention in this group.
So it’s unlikely to be harmful for most people, but don’t rely on it in place of options that are better supported.
Medical options if UTIs keep coming back
NICE defines recurrent UTI in adults as 2 or more infections in 6 months, or 3 or more in 12 months. If that’s you, especially if sex is a clear trigger, these are the options in the NICE NG112 guideline:
- Vaginal oestrogen for people who are perimenopausal or postmenopausal. It comes as a low-dose cream, pessary or ring. This is a local treatment, different from body-wide HRT; for more on HRT itself, see our piece on HRT and heart risk.
- Single-dose antibiotic after sex. NICE says to consider a one-off antibiotic dose taken after exposure to an identifiable trigger, such as intercourse, if self-help measures and vaginal oestrogen haven’t worked or aren’t suitable. Your doctor will choose the drug based on your past urine test results.
- Daily low-dose antibiotic for a set period, when single doses aren’t enough.
- Methenamine hippurate, a non-antibiotic tablet that NICE says can be considered as an alternative to daily antibiotics for some non-pregnant women.
Outside the UK, your doctor will follow local guidelines, and drug choices and prescribing rules can differ. Antibiotics have side effects and overuse feeds resistance, which is why doctors try lifestyle steps first. We explain the resistance problem in do you need antibiotics for a cold or cough.
Can men get UTIs from sex?
Yes, though it’s much less common. The NHS treats any UTI in a man as a reason to see a GP rather than self-manage, so a doctor can check for an underlying cause. The same applies to trans or non-binary people assigned male at birth.
When to see a doctor
In the UK, women aged 16 to 64 who aren’t pregnant can get UTI treatment from a pharmacist. Elsewhere, see a doctor or clinic. The NHS says to get urgent medical advice if:
- You’re pregnant, have diabetes, use a catheter or have a weakened immune system
- You’re a man, or aged 65 or over
- There’s blood in your urine
- You have pain in your lower back or side (a sign the infection may have reached your kidneys)
- You have a high temperature, feel shivery, or have a very low temperature
- Symptoms get worse or don’t improve within 48 hours of treatment
- You keep getting UTIs
The CDC lists fever, chills, lower back or side pain, and nausea or vomiting as kidney infection symptoms. These need prompt treatment.
Get emergency help by calling your local emergency number (911 in the US, 999 in the UK, 112 in the EU and India) if someone with a urine infection becomes confused, very drowsy or has trouble speaking, as this can mean the infection has spread.
Frequently asked questions
How soon after sex can a UTI start?
There’s no fixed timeline. Burning that starts within hours could be a UTI beginning or simple friction irritation. If it doesn’t settle within a day, or you also need to pee urgently, see blood or feel unwell, get checked.
Do I really need to pee right after sex?
The NHS and CDC both recommend peeing after sex. It’s free and harmless, so it’s a reasonable habit, even though it won’t prevent every infection on its own.
Can my partner give me a UTI?
Not in the way an STI spreads. A UTI usually comes from your own bacteria being moved towards the urethra during sex. Your partner usually doesn’t need treatment for your UTI.
Do condoms prevent UTIs?
Condoms don’t specifically prevent UTIs, and spermicide-coated ones may raise the risk. Choose condoms without spermicide; they still protect against STIs and pregnancy.
Is it safe to have sex while I have a UTI?
There’s no strict rule against it, but sex is often painful with a UTI and the friction can make symptoms feel worse. Many people wait until symptoms clear and any treatment is finished.
This article is for general information and is not a substitute for advice from a doctor. If you have symptoms or a health condition, please consult a qualified healthcare professional.

