Can the pill prevent STIs? The oral contraceptive pill does not prevent someone from getting an STI, it only works to prevent pregnancy. The only way to protect yourself against most STIs is by using condoms and water-based lubricant. Image