While a urinary tract infection can be triggered from sexual intercourse, by pushing bacteria into the urinary tract, urinary tract infections are not classed as STIs. It is for this reason that it is recommended to urinate after having sex. Moreover, UTIs, such as Cystitis, are not contagious and are not passed on through sexual intercourse. Regardless, it is recommended to refrain from sexual activity while you have a UTI.