To help prevent bacterial vaginosis:
Bacterial vaginosis may be passed between women during sexual contact. If you have a female sex partner, you may benefit from using protection and carefully washing shared sex toys.
Bacterial vaginosis is generally not considered a sexually transmitted infection (STI). But if you are exposed to an STI while you have bacterial vaginosis, you are more likely to get that infection.
It is always important to practice safer sex to prevent sexually transmitted infections, whether or not you have bacterial vaginosis. Preventing an STI is easier than treating an infection after it occurs.