I keep my dogs on it regardless to if they are indoors or out. (I live in Alabama...it is not uncommon for mosquitos to occasionally get in your house here.)
I had a dog that had heartworms and was successfully treated once. That is not an experience I EVER want to have again. It was a risky surgery to remove the worms, a long unpleasant recovery period of confinement and costly up into the thousands!