Veterinarians prescribe cephalexin for dogs to treat bacterial infections. While the medication is approved for human use, the FDA has not issued the same approval for animals. Despite this, veterinarians still use Keflex or cephalexin because of its effectiveness treating infections of the skin layers, urinary system, bones and respiratory system.