Skip to main content

Cefalexin for infection

Keflex

Before you take cefalexin, make sure your doctor knows if you have ever had an allergic reaction to an antibiotic.

Space out your doses evenly over the day and complete the full course.

The most common side effect of cefalexin is diarrhoea, which is usually mild and soon passes.

If diarrhoea becomes severe or lasts for more than 24 hours, you should speak with your doctor.

Continue reading below

About cefalexin

Type of medicine

A cephalosporin antibiotic

Used for

Treatment (and sometimes prevention) of infection

Also called

Cephalexin, Keflex® (USA)

Available as

Capsules, tablets, and oral liquid medicine

What is cefalexin used for?

Cefalexin is a type of antibiotic used to treat bacterial infections such as urinary tract infections, skin infections, chest and throat infections, ear infections and dental infections.

It is suitable for adults and children and can be taken during pregnancy.

Some people who are allergic to penicillin antibiotics may not be able to take cefalexin, so make sure your doctor knows if you have ever had an allergic reaction to any other antibiotic.

Cefalexin treats an infection by killing the bacteria that are causing it.

Continue reading below

Side effects of cefalexin

Common side effects of cefalexin are:

  • Diarrhoea.

  • Feeling sick (nausea).

  • Indigestion.

  • Stomach ache.

  • Thrush.

You will find a full list in the manufacturer's information leaflet supplied with the medicine.

The unwanted effects often improve as your body adjusts to the new medicine, but speak with your doctor or pharmacist if any of the following continue or become troublesome.

How to manage cefalexin side effects

Cefalexin side effects

What can I do if I experience this?

Diarrhoea

Drink plenty of water to replace the lost fluids. If the diarrhoea continues for longer than 24 hours, becomes severe, or contains blood, please let your doctor know straightaway

Indigestion, stomach ache, feeling sick

Stick to simple foods. If you are not already doing so, try taking your doses after meals

Thrush

Speak with your doctor or pharmacist for advice

Important: if you develop an itchy rash, swollen face or mouth, or have difficulty breathing, these can be signs that you are allergic to the antibiotic. Do not take any more doses, and speak with your doctor or go to your local accident and emergency department straightaway.

If you experience any other symptoms which you think may be due to the antibiotic, please speak with your doctor or pharmacist for further advice.

Continue reading below

Who should not take cefalexin?

Some medicines are not suitable for people with certain conditions. Before starting cefalexin it is important that your doctor knows:

  • If you have ever had an allergic reaction to a medicine. It is particularly important that you tell your doctor if you have had a bad reaction to a penicillin or cephalosporin antibiotic.

  • If you have any problems with the way your kidneys work.

  • If you are pregnant, trying for a baby or breastfeeding. Although cefalexin is not known to be harmful to babies, it is still important that you tell your doctor if you are expecting or breastfeeding a baby.

  • If you are taking or using any other medicines. This includes any medicines you are taking which are available to buy without a prescription, as well as herbal and complementary medicines.

How to take cefalexin

  • Read the leaflet inside the pack before starting cefalexin. It explains how the antibiotic works and lists possible side effects.

  • Take cefalexin 2-4 times a day, as directed by your doctor. Check the label for your exact dose and timing.

  • For children: if using liquid cefalexin, carefully measure each dose as instructed.

  • Treatment usually lasts 5-7 days, but your doctor may adjust this. Always follow their advice.

  • For UTI prevention: you may take one dose daily, usually in the evening.

  • You can take cefalexin before or after food, but it may work a bit faster before meals.

  • Space doses evenly through the day and complete the full course, even if you feel better.

  • If you miss a dose, take it as soon as you remember. Do not take twice to make up for a missed one.

Getting the most from your treatment

  • Tell your doctor or healthcare provider if you’re taking cefalexin before any operation or medical test, as it can affect some test results.

  • Antibiotics can sometimes cause thrush (oral or vaginal). If this happens, speak to your doctor or pharmacist.

  • If you take the contraceptive pill and have vomiting or diarrhoea for more than 24 hours while on antibiotics, the pill may be less effective. Ask your doctor or pharmacist about extra contraception. No extra precautions are needed if symptoms last less than 24 hours.

  • Cefalexin can stop the oral typhoid vaccine from working properly. Tell the person giving you any vaccines that you’re taking this antibiotic.

How to store cefalexin

  • Keep all medicines out of the reach and sight of children.

  • Store tablets and capsules in a cool, dry place, away from direct heat and light.

  • If you have been given liquid medicine, store it in a refrigerator. It will have been made up freshly by the pharmacy and lasts for 14 days, so please remember to check the expiry date, and do not use it after this date.

Important information about all medicines

Important information about all medicines

Do not take more than the prescribed dose. If you suspect that you or someone else might have taken an overdose of this medicine, go to the accident and emergency department of your local hospital. Take the container with you, even if it is empty.

This medicine is for you. Never give it to other people even if their condition appears to be the same as yours.

If you buy any medicines, check with a pharmacist that they are safe to take with your other medicines.

If you are having an operation or any dental treatment, tell the person carrying out the treatment which medicines you are taking.

Do not keep out-of-date or unwanted medicines. Take them to your local pharmacy which will dispose of them for you.

If you have any questions about this medicine ask your pharmacist.

Report side effects to a medicine or vaccine

If you experience side effects, you can report them online through the Yellow Card website.

Frequently asked questions

How quickly does cefalexin work?

Cefalexin usually starts to work within an hour after taking the first dose. Most people notice improvement in symptoms, such as reduced pain, fever, or redness, within the first 1-2 days of treatment.

Is cefalexin safe to use during pregnancy?

Yes, cefalexin is considered safe to use during pregnancy as there is no evidence that it causes harm to the baby. However, always let your doctor or midwife know you are pregnant before taking cefalexin.

Does cefalexin contain penicillin?

No, cefalexin does not contain penicillin. However it is a cephalosporin antibiotic, which is chemically related to penicillin. People who are allergic to penicillin may also be allergic to cefalexin, so it is important to inform your doctor if you have a penicillin allergy before taking cefalexin.

Can you drink alcohol with cefalexin?

Yes, you can drink alcohol with cefalexin. However, it is advised to only drink in moderation as alcohol may increase side effects such as stomach upset, dizziness, or drowsiness.

Can cefalexin cause a rash?

Yes, cefalexin can cause a rash as a side effect and is usually a sign of an allergic reaction. If you develop a mild rash, contact your doctor for advice. If you have trouble breathing or swelling of the face, lips, tongue, or throat, seek medical help immediately.

Further reading and references

Continue reading below

Article history

The information on this page is written and peer reviewed by qualified clinicians.

flu eligibility checker

Ask, share, connect.

Browse discussions, ask questions, and share experiences across hundreds of health topics.

symptom checker

Feeling unwell?

Assess your symptoms online for free

Sign up to the Patient newsletter

Your weekly dose of clear, trustworthy health advice - written to help you feel informed, confident and in control.

Please enter a valid email address

By subscribing you accept our Privacy Policy. You can unsubscribe at any time. We never sell your data.