A UTI isn’t a sexually transmitted infection (STI), and it isn’t considered a contagious condition. However, you can pass the bacteria that causes a UTI between partners. The bacterias that cause UTIs are not passed during sex. These bacterias live normally in your body all the time. Although, sex can increase your chances of getting a UTI; that is why it is advised to pee immediately after sex.