Our dog still does that sometimes
make sure u take him outside every so often, try and teach him the word toilet or something that u want to use, say it come on go to the toilet and take him outside wait there and dont let him in untill he goes, he will soon learn, our dog did and so did mums by doing this.

There is lots of reasons he could be doing it also, a vet check up wouldnt go astray could be his bladder.
We put gates on all the spare rooms , even the smaller ones 20 bucks from big w works, so our dog cant get in,always pick up the bath mats dont leave them there.
there is spray u can get to sparay around to try and make them not like the smell so they wont go there.

Put some newspaper down ina certain area and put some of the drops/spray u can also get that smells like wee, try and get him to go there

hope something helps hun i hate finding dog wee around here too