Medication

Cephalexin (Keflex)

Cephalexin is an oral antibiotic in the penicillin family, sold as Keflex. It is the standard first choice for skin infections caused by staph and strep.
At a Glance

Cephalexin is the workhorse pill for bacterial skin infection — cellulitis, widespread impetigo, an infected nail fold, an infected cyst. It covers the two bacteria behind most of them, it is cheap, and it works quickly. The honest catch is what it does not cover: MRSA. If an infection is not settling within two to three days, that is the usual reason, and a different antibiotic is needed rather than a longer course of this one.

Key Facts

Drug ClassFirst-generation cephalosporin antibiotic (related to penicillin)
Other NamesKeflex, Daxbia; cefalexin outside the United States
Prescription OnlyYes
Typical Course500 mg two to four times a day for 7 days, sometimes 10; children are dosed by weight
Cost$10 to $20 for a generic course, often less with a discount card

How It Works

Cephalexin stops bacteria building their cell wall. Without a wall, the bacterium cannot hold its shape against its own internal pressure and bursts. Human cells have no cell wall, which is why the drug can kill bacteria efficiently without doing much to you.

In dermatology it earns its place through coverage rather than power. It reliably hits Staphylococcus aureus of the ordinary, methicillin-sensitive kind, and Streptococcus pyogenes — between them responsible for most cellulitis, most impetigo that needs a pill, most infected cuts, boils and infected nail folds. It does not cover MRSA, and it does not cover the mixed bacteria in a human or animal bite, which is why those get different prescriptions.

What It Treats

Strong evidence
Cephalexin is a standard first-line oral agent for widespread impetigo, covering methicillin-sensitive Staphylococcus aureus and Streptococcus pyogenes. It does not cover MRSA.
Moderate evidence
Cephalexin covers the staph and strep involved in infected ingrown toenails. It settles cellulitis but does not resolve the underlying nail problem.
Limited evidence
Cephalexin is used for genuinely infected cysts with surrounding cellulitis. Most acutely inflamed cysts are sterile ruptures, so antibiotics are commonly prescribed without benefit.
Moderate evidence
Cephalexin covers the staph and strep that cause cellulitis. In fold rashes it is used only for spreading bacterial infection, not for uncomplicated intertrigo.

Who It's For & Who It's Not

Who it's for

Bacterial skin infection that has gone beyond what an ointment can reach: cellulitis, impetigo across several areas of the body, an infected ingrown toenail with spreading redness, a genuinely infected cyst, folliculitis that is not settling, and infected eczema.

Who it's not for

Anyone who has had a severe allergic reaction to penicillin or a cephalosporin — anaphylaxis, swelling of the face or throat, or a severe blistering rash. It is also not the right drug when MRSA is suspected, for bites, or for acne, where tetracyclines are used instead. And it will not help an inflamed cyst that is ruptured rather than infected, which is the more common situation.

How to Take It

Dose and timing
  • Spread the doses evenly through the day rather than clustering them. Cephalexin does not stay in the blood long, which is why it is taken so often — a dose every six hours keeps the level where it needs to be, and skipping the awkward one is the most common reason a course underperforms.
With or without food
  • Either. Food slows absorption slightly but does not reduce it, and taking it with food helps if it upsets your stomach.
Finish the course
  • Skin infections look better well before the bacteria are gone. Stopping at day four because the redness faded is how cellulitis comes back a week later.

What to Avoid

Alcohol does not interact with cephalexin. There is no reaction, unlike with metronidazole. Heavy drinking will add to any stomach upset, but a drink is fine.

Metformin levels can rise when taken with cephalexin. Tell your prescriber if you take it.

Probenecid, used for gout, raises cephalexin levels by slowing its clearance.

Warfarin may need closer monitoring, as with most antibiotics.

Zinc supplements taken at the same time can reduce absorption. Space them a couple of hours apart.

Probiotics or live yoghurt are worth taking during the course if you are prone to thrush or diarrhoea, spaced a couple of hours from the doses. Evidence for this is modest, but the downside is nil.

No interaction with sun, and no reason to change anything about sun protection.

Side Effects

Common and expected
  • Nausea, stomach upset or mild diarrhoeaThrush — vaginal or oral — from the antibiotic clearing normal bacteria Headache A sore mouth or altered taste
Tell your doctor
  • A rash appearing during the course. Most are mild and settle, but it should be looked at before you take another cephalosporin.Diarrhoea that is persistent rather than mild The infection not improving after two to three days — usually a sign of MRSA or that the diagnosis needs revisiting Yellowing of the eyes or skin, or unusual bruising, both of which are rare
Stop and get care
  • Swelling of the face, lips, tongue or throat, wheezing, or a sudden widespread hive-like rash — possible anaphylaxisA rash with blisters, peeling skin, sores in the mouth, or a fever with swollen glands — rare but serious drug reactions Severe, watery or bloody diarrhoea with cramping, which can start during the course or weeks after it ends and may be a C. difficile infection Redness spreading rapidly, severe pain out of proportion to how the skin looks, or feeling very unwell with a fever — that needs same-day assessment

Monitoring

A standard seven-day course in a healthy person needs no blood tests.

What is monitored is the infection itself. The expectation is that redness stops spreading within 24 to 48 hours and that pain and fever settle. A marked edge makes this easy to judge. Failure to improve in that window is the trigger to re-examine rather than to extend the course.

A wound swab or culture is worth taking when there is pus to sample, when infections keep returning, or when a first course has failed — it identifies whether MRSA is involved and which antibiotics will work.

Kidney function matters for dosing. In known kidney disease, or in older adults on repeated courses, the dose is adjusted and kidney function may be checked.

How Long Until It Works

Fever and feeling unwell usually improve within 24 to 48 hours.

Redness stops spreading in the same window. It does not immediately shrink — in cellulitis the red area often looks slightly worse on day one as the killed bacteria release their contents, which is expected and not a treatment failure.

By day three to four the area should be clearly smaller, less tender and less warm.

By the end of the course it should be settled, though skin can stay pink or discoloured for weeks afterwards. On brown and Black skin, cellulitis and impetigo often leave darker marks that take one to three months to fade — those are pigment left by the inflammation, not lingering infection.

No improvement by 48 to 72 hours is the signal to go back. The usual explanations are MRSA, an abscess that needs draining rather than antibiotics, or something that was never an infection — stasis dermatitis on the lower legs is very commonly treated as cellulitis and does not respond to antibiotics because there is nothing to kill.

What Happens When You Stop

When the course finishes, that is the end of it — no taper, no rebound.

Stopping early is the real risk. Skin infections improve visually well ahead of the bacteria being cleared, and an interrupted course is one of the more common reasons cellulitis recurs a week or two later.

Recurrence despite a completed course points somewhere else. Repeated cellulitis in the same leg usually means an entry point that has not been dealt with — most often athlete's foot cracking the skin between the toes, or swelling from poor circulation. Repeated boils usually mean staph carried in the nose. Treating the infection over and over without addressing the entry point is a familiar and avoidable loop.

After any antibiotic course, gut bacteria take a few weeks to recover, and mild looseness or thrush during that window is common.

FAQ+
I am allergic to penicillin — can I take cephalexin?Often yes, but it depends on the reaction. The old figure of a 10% cross-reaction rate is now considered much too high; the real rate with modern cephalosporins is around 1 to 2%. If your penicillin reaction was a mild childhood rash, cephalexin is usually fine. If it was anaphylaxis, throat swelling or a severe blistering rash, it is avoided and something like clindamycin or doxycycline is used instead. Tell your prescriber exactly what happened, not just that you are allergic.
Can I drink alcohol on it?Yes. There is no interaction. Heavy drinking will not help your stomach, but there is no reaction to worry about.
Why four times a day?Cephalexin clears from the blood quickly. Frequent dosing keeps the level high enough to keep killing bacteria. Missing the inconvenient afternoon dose is a genuine reason courses fail.
Does it cover MRSA?No. That is its main gap. If an infection is not improving within two to three days, MRSA is the first thing considered, and the treatment changes to something like doxycycline, trimethoprim-sulfamethoxazole or clindamycin.
Does it work for acne?It is occasionally used, but it is not a good acne drug — the bacteria involved in acne are different and it has little anti-inflammatory effect. Doxycycline and minocycline are the standard oral antibiotics for acne.
Will it affect my birth control?Modern evidence says common antibiotics like cephalexin do not meaningfully reduce the effectiveness of hormonal contraception. Rifampin is the real exception. If vomiting or diarrhoea stops you absorbing the pill, that is a separate and genuine risk, so use a backup method if you are unwell.
Is it safe in pregnancy and breastfeeding?Cephalexin is one of the antibiotics most commonly used in pregnancy and it is considered a reasonable choice. Small amounts pass into breast milk without causing problems for most infants. Tell your prescriber either way.
My leg is red and swollen but I feel fine — is it cellulitis?Maybe not. Redness and swelling on both lower legs, itchy rather than painful, with no fever, is far more often stasis dermatitis — a circulation problem, not an infection. It gets treated with antibiotics constantly and does not improve, because there is nothing to treat. Cellulitis is almost always on one leg, painful, warm, and comes with feeling unwell.
Why do I keep getting infections in the same place?Usually there is a way in that has not been fixed. Athlete's foot between the toes is the classic culprit for recurrent leg cellulitis. Treating the fungus prevents more infections than any number of antibiotic courses will.