It's simple. Closely watch your dog,each time you see him/her sniffing
around, cart them outside and stay awhile outside with them, giving
them a while to do their business. If you catch your dog or puppy in
the act of already using the bathroom in the house, try clapping
your hands loudly saying "NO!" firmly and even after using it take
them outside.
Even if your dog is not sniffing around, it would still be good to allow
them access to being outside to encourage them to use the bathroom.
Or you can take them for a walk, it's beneficial to you and them, mine
go potty each time they go for a good walk.
Each time your dog uses the bathroom outside, offer lots of praise
and affection, it really helps.
Good Luck.