Antibiotics such as amoxicillin, cephalexin, or penicillin are used to treat strep throat. Antibiotics work only against bacterial infections such as strep throat. They will not help sore throats caused by allergies or viral infections such as colds. Antibiotics are commonly used to: 1  Kill the bacteria and shorten the time you are contagious.