Skip to content

How To Prevent Getting A UTI After Sex & Why You Get Them, From Doctors

Abby Moore
Author: Medical reviewer:
September 22, 2020
Abby Moore
mbg Nutrition & Health Writer
By Abby Moore
mbg Nutrition & Health Writer
Abby Moore is an editorial operations manager at mindbodygreen. She earned a B.A. in Journalism from The University of Texas at Austin and has previously written for Tribeza magazine.
Wendie Trubow, M.D., MBA
Medical review by
Wendie Trubow, M.D., MBA
Functional Medicine Gynecologist
Wendie Trubow is a functional medicine gynecologist with almost 10 years of training in the field. She received her M.D. from Tufts University.
September 22, 2020

Getting a urinary tract infection (UTI) after sex can be a real buzzkill. Besides dealing with the pain and burning sensations while you pee while you have one, getting them consistently after sex can make the whole prospect of sexual intimacy less appealing. But there's hope: While there's no one surefire way to prevent a UTI after sex, there are many ways to at least lower your risk of getting one.

Causes of UTIs.

A urinary tract infection is a bacterial infection affecting the bladder, urethra, and, in more serious cases, the kidneys. "UTIs happen either because bacteria on the outside of the body—specifically from the rectum and vagina—find their way into the urethra or because the bladder itself becomes overpopulated with 'bad' bacteria," board-certified physician Eva Selhub, M.D., writes for mbg.

Anyone can contract a UTI, though people with vaginas are more susceptible than people with penises because their urethras are only between 2 to 3 centimeters long (compared to 15 to 29 centimeters in people with penises). The shorter urethra length makes it easier for unwanted bacteria to travel up to the bladder—especially during sex. 

At least 60% of women and 12% of men will contract a urinary tract infection1 at least once in their life, and some people experience recurrent UTIs. While some people are simply more prone to these bacterial infections, others increase their risk2 through external factors like having sex.

How can sex cause a UTI?

The urethra is directly next to the vaginal opening, urologist Vannita Simma-Chiang, M.D., tells mbg. So based on proximity alone, the odds of sexual fluids coming in contact with, and possibly infecting, the urethra are high. 

"Penetrative sex can increase the risk of getting a UTI because the penis can cause bacteria to be pushed into the urethra," OB-GYN Heather Irobunda, M.D., explains. "When this bacteria gets pushed into the urethra, it can stay there and cause an infection in the urethra, or the bacteria can travel and cause an infection in the bladder." 

Some positions might be more likely to aggravate the area, OB-GYN Wendie Trubow, M.D., MBA, adds: “Some positions bring the urethra into greater contact with the penis (in the case of penetrative sex); specifically, legs over your partner's shoulders should be avoided if you're having recurrent UTIs.”

While penetrative sex presents a much higher risk, oral sex can also cause UTIs by pushing bacteria in or around the vagina into the urethra. 

Common UTI symptoms.

These are a few common symptoms of UTIs, according to Selhub: 

  • A burning pain while urinating
  • Aching in the lower abdomen
  • A frequent/constant urgency to urinate
  • Waking up to urinate several times overnight
  • Lower-back aches
  • Feelings of nausea, dizziness, headaches, or fatigue

Does peeing after sex really help?

The research surrounding postcoital voiding (aka peeing after sex) as a way to prevent UTIs after sex is mixed. One study in the Journal of Clinical Epidemiology found college students who always pee before and after sex were less likely to get UTIs3, while another study found no link between postcoital peeing and UTI risk.

Despite the conflicting research, many doctors recommend peeing after sex as a generally healthy habit to adopt. "This flushes the bacteria that may have entered the urethra during sex out and decreases the chance of getting a UTI," Irobunda explains.

Ways to prevent a UTI after sex:

Before sex:

  • Pee before sex.
  • Clean the genital area, wiping from front to back. 
  • Make sure you and your partner wash your hands to minimize spreading bacteria to the genital area.

After sex:

  • Pee after sex.
  • Clean the genital area.
  • Drink lots of water.

General habits to prevent UTIs:

  • Visit a doctor, urologist, or OB-GYN who can test the bacteria causing your UTI and prescribe an antibiotic. 
  • Always wipe from front to back after going to the bathroom. This can prevent bacteria from the anus traveling to the vulva or urethra.
  • Change clothes after working out since sweat can promote bacterial growth. 
  • Avoid douching or washing with any scented soaps. The vagina is self-cleaning; only the vulva needs gentle washing.
  • Drink plenty of water to keep your urinary system healthy. 
  • Avoid using diaphragms4 or spermicide5 for birth control, as these may increase the risk of getting a UTI.
  • Be judicious when introducing new lubricants, condoms, or other substances to sexual play.
  • For penetrative sex, avoid sex positions that involve putting a lot of pressure on the urethra, such as missionary with your legs over your partner’s shoulders.


How soon after sex can you get a UTI?

Symptoms of a UTI usually take days to show up, Irobunda says. "This is because it takes a while for the bacteria to multiply and cause inflammation in the urethra and bladder," she says. 

When can you start to have sex again after a UTI? 

Technically you could have sex with a UTI, but it may be painful and/or worsen the symptoms. While a UTI is not a sexually transmitted infection, there is a chance of passing the bacteria that causes the infection (such as E.coli) to your partner. If you do decide to wait, there’s no right time, but most doctors recommend holding off until the symptoms subside. 

Can cranberry juice help prevent getting a UTI after sex?

Cranberry juice can be an effective treatment option, but Simma-Chiang says it's not the be-all-and-end-all solution. The active ingredient that's supposed to prevent adherence of the organism to the bladder wall (read: kill the UTI) isn't strong enough, she says. Plus, cranberry juice tends to be high in added sugars to balance out the tartness. This means people with diabetes or certain gastrointestinal and inflammatory issues usually shouldn't take it. Unsweetened cranberry pills are another option, says Trubow.

What should I do if I'm still getting UTIs constantly after sex? 

If you're still getting recurrent UTIs after sex, it's a good idea to consult a medical professional (such as your primary care physician, OB/GYN, or a urologist). After doing necessary assessments, doctors can prescribe personalized treatment options. 

“It's possible that someone is getting recurrent UTIs due to an anatomical issue,” Trubow says. “If you've had more than 3-5 UTIs in a year, it warrants a full workup."

According to Simma-Chiang, you may need to take prescribed antibiotics, a postcoital prophylaxis, or a supplement like cranberry or d-mannose to properly treat the infection. “D-mannose can also be used ongoingly and won't alter the microbiome, so it's a great alternative to antibiotics,” Trubow adds.

The bottom line.

Urinary tract infections are uncomfortable bacterial infections, which unfortunately can be caused by sex. However, it may take a few days for the symptoms to show up. To prevent UTIs from sex, many doctors recommend peeing directly after sex to flush any unwanted bacteria out of the urethra. Certain supplements may help treat recurring UTIs while others may require antibiotic treatment. Visiting a doctor to talk through all the options is advised.

Want to turn your passion for wellbeing into a fulfilling career? Become a Certified Health Coach! Learn more here.
Abby Moore author page.
Abby Moore
mbg Nutrition & Health Writer

Abby Moore is an editorial operations manager at mindbodygreen. She earned a B.A. in Journalism from The University of Texas at Austin and has previously written for Tribeza magazine. She has covered topics ranging from regenerative agriculture to celebrity entrepreneurship. Moore worked on the copywriting and marketing team at Siete Family Foods before moving to New York.