A urinary tract infection (UTI) is an infection from microbes. These are organisms that are too small to be seen without a microscope. Most UTIs are caused by bacteria, but some are caused by fungi and in rare cases by viruses. UTIs are among the most common infections in humans.

A UTI can happen anywhere in your urinary tract. Your urinary tract is made up of your kidneys, ureters, bladder, and urethra. Most UTIs only involve the urethra and bladder, in the lower tract. However, UTIs can involve the ureters and kidneys, in the upper tract. Although upper tract UTIs are more rare than lower tract UTIs, they’re also usually more severe.

Upper tract UTIs affect the kidneys. These can be potentially life threatening if bacteria move from the infected kidney into the blood. This condition, called urosepsis, can cause dangerously low blood pressure, shock, and death.

Symptoms of an upper tract urinary infection in men are similar to those in women. Symptoms of a lower tract urinary infection in men sometimes includes rectal pain in addition to the common symptoms shared by both men and women.

Treatment of UTIs depends on the cause. Your doctor will be able to determine which organism is causing the infection from the test results used to confirm the diagnosis.

In most cases, the cause is bacteria. UTIs caused by bacteria are treated with antibiotics.

In some cases, viruses or fungi are the causes. Viral UTIs are treated with medications called antivirals. Often, the antiviral cidofovir is the choice to treat viral UTIs. Fungal UTIs are treated with medications called antifungals.

The form of antibiotic used to treat a bacterial UTI usually depends on what part of the tract is involved. Lower tract UTIs can usually be treated with oral antibiotics. Upper tract UTIs require intravenous antibiotics. These antibiotics are put directly into your veins.

Sometimes, bacteria develop resistance to antibiotics. Results from your urine culture can help your doctor select an antibiotic treatment that will work best against the type of bacteria that’s causing your infection.

Treatments other than antibiotics for bacterial UTIs are being examined. At some point, UTI treatment without antibiotics may be an option for bacterial UTIs by using cell chemistry to change the interaction between the body and the bacteria.

There are no home remedies that can cure a UTI, but there are some things that you can do to help your medication work better.

These home remedies for UTIs may help your body clear the infection faster. Cranberry juice or cranberries don’t treat a UTI once it’s started. However, a chemical in cranberries may help prevent certain types of bacteria that can cause a bacterial UTI from attaching to the lining of your bladder. This may be helpful in preventing future UTIs.

It’s important to treat a UTI — the earlier, the better. Untreated UTIs become more and more severe the further they spread. A UTI is usually easiest to treat in the lower urinary tract. An infection that spreads to the upper urinary tract is much more difficult to treat and is more likely to spread into your blood, causing sepsis. This is a life-threatening event.

If you suspect that you have a UTI, contact your doctor as soon as possible. A simple examination and urine or blood test could save you a lot of trouble in the long run.

If you suspect that you have a UTI based on your symptoms, contact your doctor. Your doctor will review your symptoms and perform a physical examination. To confirm a diagnosis of a UTI, your doctor will need to test your urine for microbes.

The urine sample that you give your doctor needs to be a “clean catch” sample. This means the urine sample is collected at the middle of your urinary stream, rather than at the beginning. This helps to avoid collecting the bacteria or yeast from your skin, which can contaminate the sample. Your doctor will explain to you how to get a clean catch.

When testing the sample, your doctor will look for a large number of white blood cells in your urine. This can indicate an infection. Your doctor will also do a urine culture to test for bacteria or fungi. The culture can help identify the cause of the infection. It can also help your doctor choose which treatment is right for you.

If a virus is suspected, special testing may need to be performed. Viruses are rare causes of UTIs but can be seen in people who have had organ transplants or who have other conditions that weaken their immune system.

Upper tract UTIs

If your doctor suspects that you have an upper tract UTI, they may also need to do a complete blood count (CBC) and blood cultures, in addition to the urine test. A blood culture can make certain that your infection hasn’t spread to your blood stream.

Recurrent UTIs

If you have recurrent UTIs, your doctor may also want to check for any abnormalities or obstructions in your urinary tract. Some tests for this include:

An ultrasound, in which a device called a transducer is passed over your abdomen. The transducer uses ultrasound waves to create an image of your urinary tract organs that are displayed on a monitor.

An intravenous pyelogram (IVP), which involves injecting a dye into your body that travels through your urinary tract and taking an X-ray of your abdomen. The dye highlights your urinary tract on the X-ray image.

A cystoscopy, which uses a small camera that’s inserted through your urethra and up into your bladder to see inside your bladder. During a cystoscopy, your doctor may remove a small piece of bladder tissue and test it to rule out bladder inflammation or cancer as a cause of your symptoms.

Anything that reduces your bladder emptying or irritates the urinary tract can lead to UTIs. There are also many factors that can put you at an increased risk of a getting a UTI. These factors include:

There are additional risk factors for women. Some factors that were once believed to be a cause of UTIs in women have since been shown to not be as important, such as poor bathroom hygiene. Recent studies have failed to show that wiping from back to front after going to the bathroom leads to UTIs in women, like previously believed.

In some cases, certain lifestyle changes may help lessen the risk of some of these factors.

Shorter urethra

The length and location of the urethra in women increases the likelihood of UTIs. The urethra in women is very close to both the vagina and the anus. Bacteria that may naturally occur around both the vagina and anus can lead to infection in the urethra and the rest of the urinary tract.

A woman’s urethra is also shorter than a man’s, and the bacteria have a shorter distance to travel to enter the bladder.

Sexual intercourse

Pressure on the female urinary tract during sexual intercourse can move bacteria from around the anus into the bladder. Most women have bacteria in their urine after intercourse. However, the body can usually get rid of these bacteria within 24 hours. Bowel bacteria may have properties that allow them to stick to the bladder.

Spermicides

Spermicides may increase UTI risk. They can cause skin irritation in some women. This increases the risk of bacteria entering the bladder.

Condom use during sex

Non-lubricated latex condoms may increase friction and irritate the skin of women during sexual intercourse. This may increase the risk of a UTI.

However, condoms are important for reducing the spread of sexually transmitted infections. To help prevent friction and skin irritation from condoms, be sure to use enough water-based lubricant, and use it often during intercourse.

Diaphragms

Diaphragms may put pressure on a woman’s urethra. This can decrease bladder emptying.

Decrease in estrogen levels

After menopause, a decrease in your estrogen level changes the normal bacteria in your vagina. This can increase the risk of a UTI.

However, UTIs happen much more frequently in women than in men. The ratio is 8:1. This means that for every eight women who have UTIs, only one man does.

Certain steps may help prevent UTIs in women. For postmenopausal women, using topical estrogen prescribed by your doctor could make a difference in preventing UTIs. If your doctor believes that intercourse is a factor of your recurrent UTIs, they may recommend taking preventive antibiotics after intercourse, or long-term. Some studies have shown that long-term preventive use of antibiotics in older adults reduced the risk of UTIs.

Taking daily cranberry supplements or using vaginal probiotics, like lactobacillus, may also help in the prevention of UTIs. Some studies suggest that using probiotic vaginal suppositories can decrease the occurrence and recurrence of UTIs, by changing the bacteria found in the vagina.

Be sure to discuss with your doctor what the right prevention plan is for you.

Most UTIs go away after treatment. Chronic UTIs either don’t go away after treatment or keep recurring. Recurrent UTIs are common among women.

Many cases of recurrent UTIs are from reinfection with the same type of bacteria. However, some recurrent cases don’t necessarily involve the same type of bacteria. Instead, an abnormality in the structure of the urinary tract increases the likelihood of UTIs.

Women who are pregnant and have symptoms of a UTI should see their doctor right away. UTIs during pregnancy can cause high blood pressure and premature delivery. UTIs during pregnancy are also more likely to spread to the kidneys.

Healthline and our partners may receive a portion of revenues if you make a purchase using a link above.

Medically reviewed by Judith Marcin, MD on August 2, 2017 — Written by Verneda Lights and Elizabeth Boskey, PhD