The basic path: how infection starts

An ear infection happens when bacteria or a virus gets past your ear's natural defenses and multiplies inside. The infection usually starts in the middle ear—the air-filled space behind your eardrum—or in the ear canal, the tube that runs from your outer ear to the eardrum. Your ear has several built-in barriers meant to keep germs out: earwax traps particles, the ear canal's shape and angle make it hard for things to travel inward, and your eardrum seals off the middle ear from the outside world. When one of these defenses breaks down or gets overwhelmed, infection can take hold.

Most ear infections follow one of two routes. The first is direct entry through the ear canal—water, bacteria-laden objects, or aggressive cleaning can damage the canal's lining and let germs in. The second is through the Eustachian tube, a narrow passage that connects your middle ear to the back of your throat. When you have a cold, sinus infection, or allergies, fluid and mucus back up in this tube, creating a warm, wet space where bacteria thrive. This second route is why ear infections often follow a respiratory illness.

Key Takeaways

  • Ear infections occur when bacteria or viruses multiply in the middle ear or ear canal after your ear's natural barriers are compromised.
  • Water, earwax buildup, or objects in the ear canal can damage the lining and allow germs to enter directly.
  • Colds, sinus infections, and allergies cause fluid to back up in the Eustachian tube, creating an environment where bacteria multiply.
  • Children's Eustachian tubes are shorter and more horizontal than adults', which is why they get ear infections more often.
  • Smoking, secondhand smoke, and bottle-feeding (in infants) increase the risk of ear infection by affecting how the Eustachian tube drains.

How water and the ear canal lead to infection

Swimmer's ear—medically called otitis externa—develops when water stays trapped in your ear canal. The canal's skin is normally protected by earwax and a thin layer of oil, but prolonged moisture softens this barrier. Bacteria that live harmlessly on your skin or in water can then invade the damp, damaged tissue. This is why swimmer's ear is common after swimming, showering, or even humid weather, and why it's more likely if you clean your ears aggressively with cotton swabs or other objects.

Anything that scratches or breaks the ear canal's lining—a hearing aid that doesn't fit well, aggressive cleaning, or even scratching an itch—creates an opening for bacteria. Once the skin is damaged, bacteria like Pseudomonas aeruginosa or Staphylococcus aureus can colonize the wound. The infection causes swelling, which narrows the canal further and traps more fluid, making the problem worse. This type of infection is painful but usually stays in the outer ear and doesn't affect hearing the way middle ear infections do.

The Eustachian tube and middle ear infections

Middle ear infections are more common in children and usually start with a cold or upper respiratory virus. When you have a viral infection, your throat and nasal passages swell and produce extra mucus. The Eustachian tube—which normally drains fluid from the middle ear down into your throat—gets blocked by this swelling and mucus. Fluid accumulates behind your eardrum, and bacteria from your throat or nose travel up the blocked tube and begin to multiply in that trapped fluid.

The bacteria most often involved are Streptococcus pneumoniae, Haemophilus influenzae, and Moraxella catarrhalis. These are common inhabitants of your nose and throat that normally cause no harm, but in the sealed, fluid-filled middle ear they can cause a serious infection. The buildup of pus and fluid pushes against your eardrum, causing pain and sometimes a fever. If the pressure becomes too great, the eardrum can rupture, which actually relieves the pain but signals a more advanced infection.

Why children get ear infections more often

Children under age 3 get middle ear infections at roughly twice the rate of older children, and the reason is anatomy. A child's Eustachian tube is shorter, narrower, and more horizontal than an adult's. This shape makes it harder for fluid to drain naturally, so even a small amount of swelling from a cold can block it completely. Additionally, children's immune systems are still developing, so they catch more respiratory viruses, and each one is a potential trigger for an ear infection.

Adenoids—lymph tissue at the back of the throat—also play a role. In young children, adenoids are larger and can obstruct the Eustachian tube opening. As children grow, their adenoids shrink and their Eustachian tubes become more angled, allowing better drainage. This is why most children outgrow frequent ear infections by age 5 or 6, even without treatment. Premature infants and children with cleft palate have even higher infection rates because their Eustachian tube muscles don't function normally.

Risk factors that make infection more likely

Certain conditions and habits increase your chances of an ear infection. Secondhand smoke damages the lining of the Eustachian tube and impairs the tiny hair-like structures (cilia) that normally sweep fluid out. Bottle-feeding in infants, especially when done while lying flat, allows milk to flow into the Eustachian tube more easily than breastfeeding does. Pacifier use in young children has also been linked to higher infection rates. Allergies cause chronic swelling and mucus production, keeping the Eustachian tube partially blocked even between colds.

Immunodeficiency—whether from HIV, certain medications, or genetic conditions—makes ear infections more frequent and harder to clear. People with Down syndrome and other genetic syndromes have structural differences in their Eustachian tubes that predispose them to infection. Even something as simple as lying down while sick can worsen drainage: when you're horizontal, fluid pools more easily in the middle ear instead of draining toward your throat. This is why ear pain often gets worse at night when you're lying down.

How seasonal changes and allergies contribute

Ear infections spike during cold and flu season partly because more respiratory viruses are circulating, but also because cold air and dry indoor heating irritate nasal passages and trigger inflammation. Seasonal allergies have a similar effect: pollen or mold spores cause the nose and throat to swell, blocking the Eustachian tube. People with chronic allergies experience ongoing low-level swelling that keeps the tube partially obstructed, making them vulnerable to infection whenever a virus arrives.

Altitude changes and air pressure shifts can also trigger ear problems. When you fly or drive up a mountain, the air pressure outside your ear changes faster than your Eustachian tube can equalize it. If the tube is already swollen from a cold or allergy, it may not open at all, trapping fluid and creating pressure that can lead to infection. This is why people often develop ear pain during or shortly after air travel, especially if they're already fighting a respiratory illness.

When bacteria or viruses overwhelm your defenses

Your ear's defenses work together: earwax kills some bacteria, the ear canal's shape and acidity discourage others, and your immune system's white blood cells patrol for invaders. But when multiple defenses fail at once—say, you have a cold that swells your Eustachian tube, you go swimming and trap water in your ear canal, and you're sleep-deprived so your immune system is weakened—bacteria can establish an infection. The infection triggers inflammation, which causes swelling, pain, and sometimes fever as your body tries to fight back.

The severity of an infection depends on which bacteria or virus is involved, how many germs are present, and how well your immune system responds. A mild infection might clear on its own as your body's defenses catch up. A more aggressive infection can spread or cause complications if left untreated. This is why ear infections that don't improve within a few days, or that cause high fever, severe pain, or drainage, need medical attention—a doctor can identify the specific cause and prescribe treatment to stop the infection before it worsens.

Frequently Asked Questions

Can you catch an ear infection from someone else?

You can't catch an ear infection directly, but you can catch the cold or virus that causes one. If someone with a respiratory infection coughs or sneezes near you, you may catch that virus. If your Eustachian tube then swells and blocks, you could develop an ear infection as a secondary problem. The infection itself—the bacteria in the middle ear—stays localized and doesn't spread person to person.

Why do ear infections hurt so much?

Pain happens because pus and fluid build up behind your eardrum, creating pressure. Your eardrum is extremely sensitive, and even small amounts of pressure trigger sharp pain. The swelling also irritates the nerves in the ear canal. Pain is often worse at night when you're lying down, because gravity isn't helping fluid drain, and pressure increases. Over-the-counter pain relievers and warm compresses can help while your body fights the infection.

Does earwax cause ear infections?

Earwax itself protects against infection by trapping particles and killing some bacteria. However, excessive earwax buildup can trap water or prevent drainage, which indirectly increases infection risk. Cleaning your ears too aggressively to remove wax damages the canal's lining and is more likely to cause infection than the wax itself. The safest approach is to let earwax clear naturally or see a doctor if buildup is blocking your hearing.

Can allergies alone cause an ear infection?

Allergies alone don't cause a bacterial or viral infection, but they create the conditions for one. Allergic swelling blocks the Eustachian tube and traps fluid, which is where bacteria can multiply. Many people with allergies experience ear fullness or mild discomfort, but a true infection with pain and fever usually requires bacteria or a virus to be present alongside the allergy-related swelling.

Is it normal to get ear infections after swimming?

Swimmer's ear is common after water exposure, especially in warm, humid climates or if water stays trapped in your canal. It's not inevitable—many people swim without infection—but the risk is real if water softens your earwax barrier or if you have small cuts in the canal. Drying your ears thoroughly after swimming and avoiding aggressive cleaning reduces the risk significantly.