This weekend, I received three different emails from people regarding their dogs peeing and pooping in the house. All three people said "He does it when he's mad at me and wants to spite me". I always cringe when I read and/or hear this, because it is the furthest thing from the truth. Please believe me when I say, DOGS DO NOT ELIMINATE TO SPITE THEIR HUMANS!!!
Dogs are very sensitive creatures. Second-hand dogs (as I often call rescue dogs) are especially sensitive, and some have suffered stress, abuse, and even trauma in their 'past life'. When they are adopted in to your home, or when you move, or when the baby is born, or when you are stressed or sad, your dogs have a lot of the similar emotions that we have. They get anxious and stressed just like we do. So, when they feel anxious and stressed, they can pee and poop in the house to help themselves feel better. We do the same thing with food, wine, exercise, and cigarettes. When your rescued cattle dog lifts his leg on your new couch, he is not marking his territory- he is trying to alleviate his stress and anxiety by helping to make the area smell more 'like home'. The same can be true for cats, although it can be much more complicated for felines (but just as curable!)
If you yell at your dog, or rub their nose in their urine, they will only become more stressed, and therefore mark in the house more. If you give them free run of the whole house and they run upstairs and pee on your bed, it is not their fault, it is yours. If you take them for a 30 minute walk and they don't pee, then they come in and urinate on your expensive persian rug, you aren't predicting when they have to go well enough and setting them up to fail.
Marking behavior and inappropriate elimination are actually very fixable. Once you decrease the underlying anxiety, re-train the correct potty behavior, manage the dog's environment, change your behavior, and decrease the amount of stress, the marking can and often will go away. There are no guarantees... but there is hope.