Why is my dog peeing in the house when we're not home?
After the first month, he got settled in and more hyper, and now whenever we leave and no one is in the house (except him and the cats) he defecates inside.
We take him out before we leave, but we always come back to a mess in the house. Why is he doing this?
When you are leaving through the front door, do you say to him "bye bye dog, be a good boy today?" or do you not say a word and just leave?
How long does it take for the behavior to occur? (i.e. 5 minutes, 2 hours, etc). If it does not occur everytime, what is different about when it does not occur?
The answer to your question depends on a number of things.
However, there are two things you need to do: go to a pet shop and buy a cleaning product specifically for pets and throw away whatever cleaning products you have that are based on ammonia because it smells like urine and it basically means "pee here", then clean the floor thoroughly.
First, how old is your dog? If he's a pup, you'll need to remember that they can't control their bodily functions until they are 3-4 months old and generally need to go out whenever they wake up, which might be every 2-3 hours. If you're away more than a couple of hours, he will do his business on the floor because he can't hold it. If that's the case, you'll need to find a small area for him to stay while you're away and place there his bowl with water and one of the house training mats you can find in pet shops a couple of feet away from the bowl. Hopefully, he'll learn to use that mat while you're away.
Also, let me recommend you Pippa Mattinson's "The Happy Puppy Handbook: Your Definitive Guide to Puppy Care and Early Training". It was recently released but it's by far one of the best books available for new pup owners and it will nicely guide you through puppyhood, including crate training.
If the dog is older, things might get trickier. Normally dogs instinctively know to keep their "den" clean, meaning the area where they eat and sleep, but puppy farms or inexperienced breeders might cause that instinct to go away by locking up a pup in a crate for many hours and forcing the pup to pee and poop right next to his bowl and pretty much in his sleeping area.
I own two dogs and they both learned really fast to do their business outside, but from what I've heard the solution would be to keep an eye on the dog pretty much all the time and when he's starting to smell the ground you should quickly grab him and carry him outside and make a lot of fuss when he's doing his business outside. Hopefully, he'll learn but I've also heard that some adult dogs will still pee and poo inside from time to time.
At the same time, you can't rule out a possible infection and dogs that are ill might not be able to hold it. If that's the case, take him to a vet.
It's really hard to say with out more details. However if you are dealing with an adult dog then it sounds like you may be dealing with a bit of separation anxiety.
Probably the best thing to start with here is something that will both help with anxiety and not allow the undesirable behavior to happen when you are not at home to monitor. Crate training is by far the most ideal way to manage this type of problem because it teaches the dog that when you are not around it is time to be settled and crates help with potty training. Crate training restricts movement so that the dog feels secure, isn't as active and will not need to go potty so frequently and they really don't want to go where they have to lay. IF you can't crate train then limit the area the dog has access to one room without carpet. Make sure it is a room that the dog feels comfortable in and that you have spent time in with the dog.
Here are some other tips that should be used even if you can't crate train. Make sure you are not making a big deal about leaving or retuning. It is best for the dog if you just walk out without going through a goodbye routine. It is often confusing to the dog when you say in a high pitch or sad tone "goodbye I'll miss you be a really good dog while I am gone" and then you leave. The dog just understands you are interacting in an exciting manner getting them all riled up and then you leave them with nothing to do. Be calm when you come back home... to you it may feel good that your dog greets you like they thought you'd never come home but to a dog this is actually kind of panic behavior and it doesn't feel good.
Also practice leaving for short periods of time (a few minutes) and then coming back. Don't make a big deal about leaving or retuning. If the dog is calm when you return then reward them in a calm manner with a nice pet or treat. If the dog is anxious continue to ignore them until they are calm then reward them.