provider image
Welcome! You’re in GoodRx for healthcare professionals. Now, you’ll enjoy a streamlined experience created specifically for healthcare professionals.
Skip to main content

5 Things That Really Work to Prevent UTIs

Christine Giordano, MDPatricia Pinto-Garcia, MD, MPH
Updated on June 11, 2025

Key takeaways:

  • You can avoid a urinary tract infection (UTI) by making simple changes — like drinking more water, wiping from front to back, and peeing right after sex. 

  • People who get frequent UTIs can take antibiotics after sex to prevent a UTI. 

  • Dietary supplements, like cranberry products or probiotics, may help prevent UTIs.

01:39
Reviewed by Alexandra Schwarz, MD | June 26, 2023

Urinary tract infections (UTIs) are a common problem. A UTI happens when bacteria invade your urinary tract. This can happen when bacteria travel through your urethra (the tube that carries urine from the bladder out of your body). 

There’s a lot of advice out there about how to prevent UTIs. If you get UTIs often, you may have already tried some (or all) of these tips and found that they didn’t help. So, what actually works to prevent UTIs — and what doesn’t? Here are five science-backed ways to avoid UTIs. 

1. Use vaginal estrogen

Estrogen helps prevent UTIs by making your vagina more acidic. This helps good bacteria thrive and makes it harder for the bacteria that causes UTIs to survive. Shifting the balance towards good bacteria can help prevent UTIs.

Search and compare options

Search is powered by a third party. By clicking a topic in the advertisement above, you agree that you will visit a landing page with search results generated by a third party, and that your personal identifiers and engagement on this page and the landing page may be shared with such third party. GoodRx may receive compensation in relation to your search.

As you get older, your body makes less estrogen. This can lead to more UTIs. Studies show that if you’re perimenopausal or postmenopausal and get recurrent UTIs, vaginal estrogen can lower your risk of developing UTIs

Vaginal estrogen comes in different forms: as a ring (Estring), an insert (Vagifem), or a cream (Premarin, Estrace). Your healthcare team can help you choose the right product and give you a prescription. 

2. Take antibiotics

People usually take antibiotics if they already have an infection. But taking antibiotics every day or after sex can help prevent a UTI before it starts. Prophylactic antibiotics are a good option for people who get frequent UTIs, including people who get UTIs after sex. 

Your chance of getting a UTI can increase after having sex. That’s because during sex, bacteria from the skin can move closer to the urethra and cause a UTI. If you often get UTIs after sex, taking a single dose of an antibiotic within 2 hours after sex can help prevent them. 

Another option is to take a low-dose antibiotic every day for up to 6 to 12 months. This can also stop frequent UTIs. 

Antibiotics used for UTI prophylaxis include:

GoodRx icon

But there are drawbacks to this method. UTIs can come back when you stop taking antibiotics. Also, using antibiotics too often can lead to antibiotic resistance, which may make it harder to treat future infections. 

3. Stay hydrated

Staying hydrated during the day may help prevent UTIs. The theory is that drinking plenty of water helps “flush out” your bladder. This pushes bacteria out quickly, before they have time to multiply and cause infection. 

But there haven’t been a lot of studies to prove this works. One study in premenopausal women with frequent UTIs found that those who drank at least 50 oz of water a day had fewer UTIs. 

4. Pee after sex

During sex, bacteria that live on your skin and around your genitals can get moved toward your urethra. Peeing soon after sex may help flush out these bacteria so they don’t cause an infection.

This is a longstanding theory, but there isn’t a lot of evidence to back it up. Even so, many experts still recommend peeing after sex because it has no downsides and it does work for some people. 

5. Wipe from front to back

Bacteria that live in your gut — like Escherichia coli (E. coli) — live on your stool too. And E. Coli is the bacteria that causes most UTIs. Wiping from front to back keeps E. coli from getting too close to your urethra and causing UTIs. 

While this theory makes sense, it hasn’t been well studied. But there are studies showing that people who wipe back to front might have a higher risk of developing UTIs.

Like peeing after sex, wiping from front to back is a simple, low-risk habit that can decrease your risk of getting a UTI. 

Bonus: 4 more things that may help prevent UTIs

If prophylactic antibiotics or vaginal estrogen aren’t your thing (or you can’t use them), there are still other things you can add to your prevention arsenal. 

These options don’t have quite as much evidence behind them, but here are four more things you can try to help prevent UTIs.

1. Cranberry products

Cranberries contain compounds called proanthocyanidins. These make it harder for bacteria to stick to your urinary tract and cause infection. But it’s not clear if cranberry products work for everyone. 

It’s also not clear which cranberry product works best or how much you need to take to prevent UTIs. Some studies show that you may need to drink between 5 oz and 25 oz of cranberry juice (not cranberry cocktail) every day to see an effect. 

Cranberry juice contains a lot of sugar, so it might not be right for you. But there may be other cranberry products you can try. Some small studies show that eating dried cranberries and taking cranberry tablets might work. 

2. Probiotics

Probiotics are dietary supplements that contain live bacteria. One type, called Lactobacillus, is a “good bacteria” that lives in your gut and vagina. People who don’t have as much Lactobacillus in their vagina tend to get more UTIs

So, by reestablishing your Lactobacillus, you may be able to decrease your risk of developing UTIs. But studies show it doesn’t work for everyone.

Lactobacillus comes in a capsule that you take by mouth or as an intravaginal suppository. The FDA doesn’t regulate probiotics, so this makes it tricky to know which brand or type will work best.

3. Methenamine hippurate 

Methenamine hippurate is a prescription medication that makes it harder for bacteria to grow inside your urethra and bladder. 

Some studies show it can help prevent UTIs. Methenamine is generally safe and doesn’t put you at risk for developing resistance to antibiotics. It may be worth trying if you get frequent UTIs and want to avoid taking daily antibiotics. 

4. A change in birth control

Spermicide can increase your risk of developing a UTI. Some birth control options, like diaphragms, need spermicide to work. 

Switching to a birth control that doesn’t use spermicide can help lower your risk of getting UTIs. 

When should you seek care for a UTI?

You should seek care as soon as possible if you have symptoms of a UTI, like:

  • Pain or burning when you pee 

  • An urgent need to pee 

  • Needing to pee frequently

  • Cloudy, pink, or blood-tinged urine

  • Pain in your lower abdomen, where your bladder sits

Your healthcare team can diagnose a UTI and start you on antibiotic treatment right away. This will help you feel better faster and prevent complications from UTIs, like kidney infections. 

UTIs usually don’t go away on their own without antibiotic treatment. And taking a “wait-and-see” approach can increase your chances of a kidney infection — especially if you’re pregnant or have a weakened immune system. So, it’s best not to wait to seek care. 

The good news is that your prescriber may be able to provide you with a prescription for antibiotics through a telehealth appointment, especially if you have a history of UTIs and aren’t at risk for UTI complications. 

Frequently asked questions

What can help prevent UTIs in older adults?

Staying hydrated and emptying your bladder regularly can help prevent UTIs in older adults. Encourage older adults to drink enough fluids throughout the day. Older adults may have trouble getting to the bathroom because of mobility issues. Having a bedside commode or an easy-to-reach toilet can help, especially during the day and night. 

Are UTIs contagious? 

UTIs aren’t contagious. You can’t catch a UTI or kidney infection from another person. 

Can yogurt help with a UTI?

Some yogurts have live bacteria cultures, also known as probiotics. Probiotics may help some people avoid getting UTIs in the future. But they won’t help if you already have a UTI. It’s also not clear how much yogurt you need to eat to get the benefits of probiotics. Most people choose probiotic supplements instead. 

Is there a pill you can take daily to prevent UTIs?

Some people can take one dose of antibiotics every day to prevent UTIs. This method isn’t right for everyone. Your healthcare team can help you decide if this approach is right for you. 

The bottom line

If you get frequent UTIs, there are things that can help lower your risk of developing them. Simple changes — like drinking more water, peeing after sex, and wiping from front to back — may help prevent UTIs. Taking a single dose of antibiotics after sex (or once a day) can also prevent UTIs. 

why trust our exports reliability shield

Why trust our experts?

Christine Giordano, MD
Christine Giordano, MD, is board-certified in general internal medicine. She received her medical degree from Rutgers New Jersey Medical School and completed residency at Thomas Jefferson University.
Patricia Pinto-Garcia, MD, MPH
Patricia Pinto-Garcia, MD, MPH, is a medical editor at GoodRx. She is a licensed, board-certified pediatrician with more than a decade of experience in academic medicine.
View All References (12)

Centers for Disease Control and Prevention. (2024). Urinary tract infection basics.

Dason, S., et al. (2011). Guidelines for the diagnosis and management of recurrent urinary tract infection in women. Canadian Urological Association Journal.

Fihn, S. D., et al. (1996). Association between use of spermicide-coated condoms and Escherichia coli urinary tract infection in young women. American Journal of Epidemiology.

Hooton, T. M., et al. (2018). Effect of increased daily water intake in premenopausal women with recurrent urinary tract infections a randomized clinical trial. JAMA International Medicine.

Kirjavainen, P. V., et al. (2009). Abnormal immunological profile and vaginal microbiota in women prone to urinary tract infection. Clinical and Vaccine Immunology.

Kodner, C. M., et al. (2010). Recurrent urinary tract infections in women: Diagnosis and management. American Family Physician.

Krouse, M., et al. (2009). Local effects of vaginally administered estrogen therapy: A review. Journal of Pelvic Medicine & Surgery.

Lee, B. S. B., et al. (2012). Methenamine hippurate for preventing urinary tract infections. Cochrane Library of Systematic Reviews.

Loubet, P., et al. (2020). Alternative therapeutic options to antibiotics for the treatment of urinary tract infections. Frontiers in Microbiology.

Persad, S., et al. (2006). Association with urinary tract infection and post micturition wiping habit. Acta Obstetricia et Gynecologica.

Raz, R., et al. (1993). A controlled trial of intravaginal estriol in postmenopausal women with recurrent urinary tract infections. The New England Journal of Medicine.

Stapleton, A. E., et al. (2016). The vaginal microbiota and urinary tract infection. Microbiology Spectrum.

GoodRx Health has strict sourcing policies and relies on primary sources such as medical organizations, governmental agencies, academic institutions, and peer-reviewed scientific journals. Learn more about how we ensure our content is accurate, thorough, and unbiased by reading our editorial guidelines.

Was this page helpful?

Learn more about Urinary Tract Infections

Stay informed, and get prescription saving tips and more from GoodRx Health.

By providing your email, you consent to receive marketing communications from GoodRx, which may include content and/or data related to men’s health, women's health, reproductive care, or sexual health. You agree to the GoodRx Terms of Use and acknowledge the Privacy Policy. You can unsubscribe at any time.