Can you take cephalexin if allergic to sulfa drugs?

Yes. Cephalexin has no sulfa derivatives. Rather, it more closely resembles the penicillin/amoxicillin antibiotics. If you have an alergy to those, however, you may have some unpleasant side effects/reactions. Don't be afraid to call your doctor or pharmacist to ask questions before taking any medication.