Urinary Tract Infection Prevention

Personal hygiene and changes in sex practices are key

Table of Contents
View All
Table of Contents

A urinary tract infection (UTI) happens when harmful bacteria enter the urinary tract. UTIs can have various causes, from wearing synthetic underwear to sexual activity. Between 50% and 60% of females and 20% of males are likely to get a UTI at some point during their lives. Thus, prevention is key to avoiding the persistent and sometimes severe complications of infection. 

While safer sex and good genital hygiene are central to preventing a UTI, other practices may help if you are prone to recurrent infection, including avoiding scented soaps and other products, staying well-hydrated, and not holding your urine.

This article discusses some of the ways urinary tract infections can be prevented in females, males, and children.

UTI prevention tips
Verywell / Theresa Chiechi

Gender Definitions

For the purpose of this article, "male" refers to people with penises and "female" refers to people with vaginas despite the gender or genders they identify with. The gender terms used in this article reflect the terms used in the cited references.

General Tips

The primary aim is to avoid the introduction of harmful bacteria into the urinary tract, either as a result of bathroom habits or sexual activity. The secondary aim is to maintain your urinary tract health and make it less vulnerable to infection.

Females are up to three times more likely to get a urinary tract infection than males.

Everyone can benefit from the same prevention tips:

  • Cleanse your genitals before and after sex: Use warm water and a plain, mild soap. Avoid harsh cleansers or scented soaps, which can cause inflammation of the urethra (the tube through which urine leaves the body).
  • Urinate immediately after sex: Doing so helps flush bacteria and other microbes out of the urinary tract.
  • Wash your rectum daily: Regular washing prevents bacteria from spreading from residual fecal matter, often trapped in skin folds, to adjacent tissues.
  • Drinks lots of water: By regularly flushing the urinary tract, bacteria will have a harder time establishing an infection. Aim to drink eight glasses of water per day (roughly a half gallon).
  • Don't hold your urine: Holding your urine allows any bacteria circulating in the bladder to establish an infection. Go to the bathroom as soon as you feel the need and empty your bladder completely.

In Females

The risk of UTI in females is greater due in part to the shorter urethra and the natural bacteria in the vagina. These factors make it easier for bacteria to travel from outside the body into the bladder.

The "good" Lactobacillus bacteria found in the vaginal flora help maintain the ideal acidity (pH 3.8 to 4.5) to keep harmful bacteria at bay. Disrupting this balance can promote infection and make a UTI more likely.

Here are some of the most effective ways to prevent a UTI.

Avoid Douching

Douching strips away the vaginal flora and creates the ideal environment for a bacterial infection.

Choose Showers Over Baths

Shower once a day instead of bathing in a tub. Bathing can alter vaginal pH and introduce soap residue and other chemicals into the vagina. If using a washcloth, clean the genital area first and the anus after. If using a hand shower, point it in a downward direction over the vagina rather than into the vagina directly.

Avoid Harsh or Scented Soaps

Fragrances used in some soaps and other bath and hygiene products can cause an allergic reaction in the vulva. Scented products of any sort can also irritate vaginal tissues, including feminine hygiene sprays, bubble baths, perfumed bath oils, scented powders, scented tampons, and scented pads.

Even if the reaction is mild, it can lead to bacterial growth if the resulting rash is moist or rubbed. That bacteria can travel into the urinary tract, causing a UTI.

Instead of using a harsh or scented product, choose milder soaps like Dove Sensitive or Cetaphil.

Wipe From Front to Back

After urinating, tilt your body forward and, reach between your buttocks to start wiping from the front of the vagina to the back. When you are finished, take a separate piece of paper to clean the anus, starting at the perineum (the space between the vagina and anus) and wiping back between your buttocks. Doing so prevents the introduction of bacteria from the anus to the vagina.

Use Condoms

Even if you are in a monogamous relationship, condoms can prevent the transmission of bacteria during vaginal intercourse. Avoid unlubricated condoms, which can stress vaginal tissues, and spermicidal lubricants (like nonoxynol-9), which can trigger vaginal inflammation.

Flavored condoms and lubricants are also not advised as they are infused with sugars that promote bacterial growth and flavorants that cause irritation.

Avoid Using a Diaphragm

This is important if you are prone to urinary tract infections. A diaphragm can promote the growth of coliform bacteria like E. coli. Consider switching to alternate forms of contraception, such as the pill or condoms.

Wear Breathable Cotton Underwear

Synthetic fabrics trap moisture and create the perfect breeding ground for infection. If you are prone to UTIs, wear loose-fitting, cotton underwear that allows air to circulate the vagina. At night, you can wear loose-fitting boxers or shorts.

Try Probiotics

Probiotics found in foods like yogurt and over-the-counter nutritional supplements help maintain healthy digestive flora and can promote the same in the vagina.

Take Cranberry Supplements

Proanthocyanidins (PACs) are compounds naturally found in cranberries. Growing research has shown that PACS can help prevent urinary tract infections. Taking a high-quality supplement with at least 36mg of PACs may help prevent infections better than drinking cranberry juice daily.

Ask Your Healthcare Provider About Medications

If you have a high risk for recurring UTIs, your healthcare provider may also recommend you take vaginal estrogen and/or preventive antibiotics, which may be prescribed to take daily or following sexual activity.

In Males

Urinary tract infections in males differ from females in that they are less commonly caused by sex. The only exception may be anal sex in which fecal matter can be introduced into the male urethra.

UTIs in males are primarily associated with age and are associated with physical changes that prevent the bladder from fully emptying (such as enlarged prostate) or that cause bowel control problems.

In addition to following general prevention tips, males can reduce their risk of a UTI by adhering to certain practices.

Use Condoms When Engaging in Anal Sex

Avoid oil-based lubricants, which can cause condom breakage, and instead, opt for a water-based lubricant that neither contains spermicides nor a numbing agent like lidocaine.

Wash Under Your Foreskin if You Are Uncircumcised

The tissue beneath the foreskin can be a breeding ground for bacteria unless cleaned daily. Failure to do so can lead to urethral inflammation and an increased risk of infection.

Keep Your Genitals Dry

Wear cotton underwear and change them daily (or more frequently if they get sweaty or you experience bowel or bladder leakage).

Take Prostate Medications as Prescribed

Prostate medication helps improve your urinary flow and reduce the risk of infection. Be sure to keep your kidneys working by drinking plenty of water.

If your prostate drugs aren't working as well as they should, speak with your healthcare provider. Prostate issues that cause urinary retention are among the most common causes of urinary infections in older males.

In Children

UTIs in children can be avoided by teaching your child about hygiene and other healthy habits.

Urinary tract infections are common in children, especially females.

Never "Hold It"

Children should urinate four to seven times during the day. Young children will often squat and grab their genitals when they need to go. This may force the bacteria deeper into the urinary tract and cause infection.

Practice Good Toileting Habits

This includes teaching kids to take their time when going to the bathroom and to completely empty their bladders without straining.

Change Clothes

Clean underwear should be worn every day (or after an accident or excessive sweating). Don't let your child wear damp clothing, such as after swimming.

Keep Well Hydrated

Children ages 5 to 8 should drink 5 glasses of water per day. Children ages 9 to 12 should increase to 7 glasses per day. From the age of 13 onward, intake should be no less than 8 to 10 glasses daily.

Summary

You may be able to prevent a urinary tract infection by following certain guidelines. It is important to avoid harsh or scented soaps or other products that may cause irritation. Other strategies that can help include practicing good hygiene, staying hydrated, and wearing breathable cotton underwear.

If you are prone to getting UTIs, talk to your healthcare provider about supplements or medications that may help reduce the incidence of urinary tract infections.

19 Sources
Verywell Health uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. Medina M, Castillo-Pino E. An introduction to the epidemiology and burden of urinary tract infections. Ther Adv Urol. 2019;11:1756287219832172. doi:10.1177/1756287219832172

  2. Farrell K, Tandan M, Hernandez Santiago V, et al. Treatment of uncomplicated UTI in males: A systematic review of the literature. BJGP Open. 2021;5(2):bjgpopen20X101140. doi:10.3399/bjgpopen20X101140

  3. Harvard Health Publishing. Urinary tract infection in women.

  4. Navarro S, Abla H, Delgado B, Colmer-Hamood JA, Ventolini G, Hamood AN. Glycogen availability and pH variation in a medium simulating vaginal fluid influence the growth of vaginal Lactobacillus species and Gardnerella vaginalis. BMC Microbiol. 2023;23(1):186. doi:10.1186/s12866-023-02916-8

  5. Chen Y, Bruning E, Rubino J, Eder SE. Role of female intimate hygiene in vulvovaginal health: Global hygiene practices and product usage. Womens Health (Lond). 2017;13(3):58-67. doi:10.1177/1745505717731011

  6. Dysuria: What you should know about burning or stinging with urination. Am Fam Physician. 2015; 92(9).

  7. Kaur R, Kaur R. Symptoms, risk factors, diagnosis and treatment of urinary tract infections. Postgrad Med J. 2021;97(1154):803-812. doi:10.1136/postgradmedj-2020-139090

  8. Harvard Health Publishing. Urinary tract infection in men.

  9. Gibson K. Clinical urinary tract infection in the pediatric patient. Journal of Urgent Care Medicine; 2022.

  10. Akgül T, Karakan T. The role of probiotics in women with recurrent urinary tract infections. Turk J Urol. 2018;44(5):377-383. doi:10.5152/tud.2018.48742

  11. American Urological Association. Recurrent uncomplicated urinary tract infections in women: AUA/CUA/SUFU Guideline (2019). 2019.
  12. Smith AL, Brown J, Wyman JF, Berry A, Newman DK, Stapleton AE. Treatment and prevention of recurrent lower urinary tract infections in women: A rapid review with practice recommendations. J Urol. 2018;200(6):1174-1191. doi:10.1016/j.juro.2018.04.088

  13. Lee A, Gaither TW, Langston ME, Cohen SE, Breyer BN. Lubrication oractices and receptive anal sex: Implications for STI transmission and prevention. Sex Med. 2021;9(3):100341. doi:10.1016/j.esxm.2021.100341

  14. Petcu CT, Stehr E, Isaac JP, Desai D. Management of paediatric recurrent urinary tract infections and challenges in special patient populations. Aust J Gen Pract. 2021;50(7):458-464. doi:10.31128/AJGP-03-21-5922

  15. Michigan Medicine. How to prevent a urinary tract infection (UTI).

  16. National Institute of Diabetes and Digestive and Kidney Diseases. Symptoms & causes of bladder control problems & bedwetting in children.

  17. Johns Hopkins Medicine. Urinary tract infections (UTI) in children.

  18. American Academy of Pediatrics. Prevent urinary tract infections in children.

  19. Choose water as a drink. Healthy Kids, NSW Ministry of Health.

Additional Reading

By Tracee Cornforth
Tracee Cornforth is a freelance writer who covers menstruation, menstrual disorders, and other women's health issues.