Avoid risk factors of UTIs. Keep well-hydrated, make sure to completely empty the bladder and for women, always wipe front to back. For recurrent sufferers, urinate as soon as possible after having sex.