If the dog is a new dog, it could be because of the new environment & they just need some time to adjust. But if it's a dog you've had, and they just started doing this, it could be a couple things, something has changed in their environment & they don't like it (people moving in or out/ you moved their bed or food & water dishes, stuff similar to this. (One of my cats will pee on the floor or bed if his litter box isn't clean enough). The other possibility is they could have an infection. Usually its a bladder or urinary tract infection, something that they're trying to tell you they have a problem! He or she may not even be able to make it outside (if its a really bad infection). They will need to go to the vet for this, but it would probably just require an exam with a quick test & prescription meds.
Don't know what to tell you, I do have a house dog.
Are you using a crate? Crate training is great for this issue just don't keep the dog in the crate longer then 4hrs. And soon as you let it out take it right out side. Have a treat with you and soon as it uses the bathroom outside give it a treat with a lot of good praise. After it stops peeing in the house you can stop using the crate.
Thanks! Your answer is awaiting moderation.