Each STI may be treated with a different antibiotic, so this depends on what you test positive for. Antibiotics are generally effective in treating STIs caused by bacteria although some infections can be resistant to certain antibiotics. There are often backup treatments available if the first course of antibiotics doesn’t clear up your infection. The most common first-line treatment for many STIs is doxycycline.