Cefalexin can treat certain bacterial infections, including those of the middle ear, bone and joint, skin, and urinary tract. It may also be used for certain types of pneumonia, strep throat, and to prevent bacterial endocarditis. Cefalexin is not effective against infections caused by methicillin-resistant "Staphylococcus aureus" (MRSA), "Enterococcus", or "Pseudomonas". Like other antibiotics, cefalexin cannot treat viral infections, such as the flu, common cold or acute bronchitis. Cefalexin can be used in those who have mild or moderate allergies to penicillin. However, it is not recommended in those with severe penicillin allergies.