What causes UTI? Diagnosis, prevention, and treatment

Medically reviewed by Stephanie MelbyPharm.D.
Licensed Pharmacist
Updated Oct. 27, 2023  •  Published Feb. 22, 2023
Fact Checked
UTI causes

Overview: What is a UTI?

A urinary tract infection is a bacterial infection of one or more parts of the urinary system. The infection can affect the urethra, the bladder, the kidneys, the ureters (the tubes that pass urine from the kidneys to the bladder), or several locations at once. About 40% of women and 12% of men will have a UTI at some point. At least 2.5% of children will have a UTI during childhood, usually before they turn five years old. While bacteria cause UTIs, several factors can cause the infection. Understanding these contributing factors can help people minimize the likelihood of urinary tract infections or prevent recurrent UTIs.

Key takeaways:

  • UTI is a common health condition that mainly affects women.

  • Bacterial infections cause UTIs, but several factors can spread the bacteria into the urinary tract and increase the likelihood of infection.

  • Risk factors for UTI include being female, young, past menopause, an older adult, or sexually active. Other factors that can raise the risk of UTIs include urinary tract problems, blockages, a weakened immune system, recent urinary tract surgery, or the use of diaphragms or a urinary catheter.

  • Symptoms of UTI include painful urination, pain in areas around the urinary tract, urinary urgency, and discolored urine.

  • UTI usually requires a medical diagnosis.

  • UTI generally does require treatment. It typically resolves within one or two weeks after starting antibiotic treatment.

  • Antibiotics may be used to treat UTIs. Read more about UTI treatments here.

  • UTI is preventable by careful hygiene, drinking fluids, urinating frequently, avoiding douches, and using contraceptives other than diaphragms and spermicide. 

  • Use coupons for Bactrim (trimethoprim/sulfamethoxazole), Cipro(ciprofloxacin), and Macrobid (nitrofurantoin) to save up to 80%.

What causes UTIs?

Bacterial infections are the cause of UTIs, particularly Escherichia coli, a bacteria that normally lives in the colon. That being said, what causes the bacterial infection itself? How do the bacteria get into the urinary tract? The urine is normally sterile, so what are some of the things people do to get infected? 

What causes UTI?

Most urinary tract infections begin with bacteria entering the urethra, the opening of the urinary tract to the outside. The bacteria itself usually originates in the colon and lives in small colonies around the anus, and the area between the anus and genitals called the perineum. In rare cases, bacteria can get into the urinary tract through the bloodstream, but this doesn’t happen often. Once the bacteria enter the urethra, they can migrate up the urethra and into the bladder, which is a part of the urinary tract. Women have a shorter urethra than men, so bacteria have a shorter distance to travel to the bladder. A bladder infection is what most people think of as a urinary tract infection, but the bacteria can ascend into the ureters to the kidneys and cause a more serious UTI.

Several causes can help bacteria get to the urethral opening or migrate up the urinary tract. First off, not only are women’s urethras shorter than men’s, but they are also closer to the perineum and rectum. Bacteria do not have to be moved very far to reach the urethral opening. Specific activities that can spread bacteria to the vagina or cause an overgrowth of bacteria that can cause a UTI include:

  • Changes in the microbe ecosystem around the genitals caused by overwashing, douching, or menopause

  • Sexual activity

  • Use of diaphragms, vaginal rings, or spermicide

  • Wiping the anus and genitals

  • Pelvic exams or procedures

  • Infrequent urination

  • Catheters

Risk factors for UTI

Several factors put people at a higher risk of UTIs. They either make it more likely that microbes will enter the UTI, make it more likely for an infection to take hold, or make it more likely to spread up the urinary tract.

Risk factors that make it more likely for microbes to enter the urinary tract include:

  • Being female

  • Age younger than 5

  • Being past menopause

  • Sexual activity

  • Use of diaphragms or spermicide

  • Catheterization

  • Pelvic exams

  • Frequent douching

  • Overwashing

  • Obesity

Risk factors that make it more likely that microbes will develop into a bladder infection include:

  • Catheterization

  • Diabetes

  • Pregnancy

  • Infrequent urination

  • Dehydration

  • Pelvic organ prolapse

  • Sickle cell anemia

  • Weakened immune system

  • Obesity

Risk factors that can lead to the spread of an infection to the kidneys include:

  • Kidney stones

  • Blockage

  • Backflow of urine from the bladder 

  • Weakened immune system

  • Pregnancy

  • Diabetes

  • Obesity

Is a UTI serious? When to see a doctor

A UTI can clear up on its own, but not always. An untreated UTI can lead to serious complications, including kidney infections and recurrent UTIs. See a healthcare professional when experiencing symptoms of a UTI. While people who have experienced a UTI can usually identify one when it happens, only a doctor can diagnose a UTI, identify the infecting microbe, and prescribe the most effective treatment.

On the other hand, a kidney infection will require emergency medical treatment. A kidney infection could lead to severe complications, including permanent kidney damage or kidney failure. The most common symptoms of a kidney infection are:

  • Fever

  • Flank pain

  • Nausea or vomiting

Other symptoms of a kidney infection include lower back pain, painful urination, and blood in the urine. 

How is a UTI diagnosed?

A healthcare professional will diagnose a lower urinary tract infection based on symptoms, a physical exam, and a urinalysis. Often, the symptoms and a physical exam are enough for a diagnosis. The provider may ask when the symptoms started, the nature of the symptoms, and any other signs. A physical exam will focus on tenderness in the areas of the urinary tract, particularly the kidneys. The healthcare provider may ask for a urine sample to be tested for blood, white blood cells, and other substances. A urine culture can help identify the infecting microbe to better guide treatment, but antibiotic treatment will often start before then. If an obstruction or anatomical abnormality is suspected, medical imaging may be needed.

If an upper urinary tract infection is suspected, a urine sample will be required to test for pus, blood, and clues to the infecting organism. A CT scan, x-ray, or ultrasound may also be used, but they often aren’t needed.

Is a UTI contagious? 

Urinary tract infections are not contagious. The microbes that cause a urinary tract infection are almost always natives. They just don’t belong in the urinary system.

Is a UTI curable?

Most UTIs are curable, but the treatment will depend on the type of UTI: lower UTI (urethritis or bladder infections) or upper UTI (kidney and ureter infections)

Most lower urinary tract infections and kidney infections can be quickly resolved with antibiotics. Though some UTIs go away without treatment, see a healthcare provider when experiencing any of the symptoms of a UTI. Symptoms will fade in two to seven days after starting a course of antibiotics. 

The most common treatment for lower urinary tract infections is short course antibiotic treatment, that is, three to seven days of antibiotics such as Bactrim (trimethoprim/sulfamethoxazole) or cephalosporins. If other medications do not work, a one-day treatment with the antibiotic Monurol (fosfomycin) is available. Other treatment options include Macrobid (nitrofurantoin), amoxicillin, and quinolone antibiotics. Longer treatment courses (more than 7 days) may be required for some people.

The most common treatments for kidney infections are two weeks of antibiotics and analgesics for pain and fever reducers. 

RELATED: How to prevent a yeast infection from antibiotics

How to prevent UTIs

Not only are most UTIs curable but they are also preventable. Healthcare professionals are very concerned about preventing UTIs because they encounter infections that are resistant to antibiotics. In the age of drug-resistant bacteria, the best treatment may be prevention. Here are a few tips:

  • Drink plenty of fluids every day

  • Urinate frequently throughout the day

  • Don’t “hold it in” when you need to pee

  • Keep the genital area dry

  • Wipe from front to back after going to the toilet

  • Urinate right after sexual intercourse

  • Avoid using diaphragms or spermicide for birth control

  • Avoid douching

  • Take the supplement D-mannose to help control E. coli

  • For women past menopause, consider estrogen replacement therapy or vaginal estrogen cream

RELATED: Cranberry juice and other home remedies for UTIs

Most importantly, see a healthcare professional when experiencing UTI symptoms

UTIs are infections. Some people are more at risk, especially people with a urinary catheter. A urinary tract infection can only be definitively diagnosed by a healthcare professional. Don’t try to tough it out. Even though some UTIs can resolve on their own, they can also get worse. Antibiotics usually clear up symptoms in short order. They wipe out the infection and, most importantly, prevent it from developing into a worse medical condition. A healthcare professional can figure out what’s causing the symptoms and the best way to treat the problem.

FAQs about UTI causes

Why do I keep getting urinary tract infections?

Frequent sexual intercourse is the most common reason women experience recurrent UTIs, but there may be other reasons, such as having risk factors for UTIs, vaginal douching, using diaphragms and spermicide, infrequent urination, or structural problems with the urinary tract.

What are the causes of UTI in men vs. women?

Men get UTIs in the same way as women. Bacteria get into the urethra and migrate to the bladder. Men are far less likely to get UTIs from sexual activity. Causes are frequently related to not peeing enough or having some kind of blockage, most commonly a blockage caused by an enlarged prostate.

What causes complicated UTIs?

Complicated UTIs are urinary tract infections that risk developing into more severe and damaging infections. Complicated UTIs require more diagnostic work and take longer to treat. In other words, complicated UTIs aren't necessarily "worse" than simple ones, but they could be, so doctors have to work harder and more carefully to diagnose and treat them. A complicated urinary tract infection includes any UTI in a man, a pregnant woman, or anyone with an obstruction, kidney stone, weakened immune system, catheter, kidney disease, uncontrolled diabetes, or who has had a kidney transplant. Recurrent UTIs and any UTI caused by unusual microbes are also considered complicated. Remember: these aren’t necessarily “bad” UTIs. They simply have complicating factors that make healthcare professionals more concerned and careful in their work.

What’s next? Additional resources for people with UTI

Test and diagnostics

Treatments

Scientific studies and clinical trials

Medically reviewed by Stephanie MelbyPharm.D.
Licensed Pharmacist

Stephanie Melby, B.S., Pharm.D., received a bachelor of science in nutrition from the University of Minnesota and a doctorate of pharmacy from the University of New England. She has seven years of experience in retail pharmacy and is certified in Medication Therapy Management (MTM). Dr. Melby resides in Minneapolis, Minnesota.

...