Q: We had two questions for Victoria on the sensitive issue of marking and inappropriate defecation. One involved a young male dog adopted from a shelter who, the owner wrote, “is an ideal playmate for our female dog and is perfect in all ways but one: though we walk him multiple times a day, take him out after meals and pay close attention to him, he still urinates in the house, and will even mark us with urine. We’ve taken him to the vet and he received a clean bill of health.” The other involved a female who had a hard beginning in a puppy mill; her owner noted that she “sometimes will poo while lying in bed or sitting on the couch with us, sometimes even while sitting on our lap. We’ve tried (with limited success) to anticipate her need to go outside, but this has us stumped.”

A: Scent marking is a very normal and common behavior, particularly in male dogs, but it becomes a big problem when marking occurs in the home. Dogs mark to advertise their presence and to claim territory and resources. Urine and feces contain pheromones, or chemical messages, that convey information — age, gender, health and reproductive status — about the dog doing the marking.

Resources such as toys, food bowls, chew treats, bones and beds are the most likely objects to be marked. As you’ve experienced, a dog will also actually mark a person or something that smells heavily of that person, such as a sofa or bed.

Even though marking can have a dominant and competitive component, it may also occur if a dog is overstimulated — for example, during or after vigorous play — or becomes anxious in a particular situation, such as when a person leaves. This common expression of anxiety in dogs is often mistaken for spite, resulting in punishment, which only serves to increase the anxious behavior. Scent marking is also more common in multidog households where dogs compete for space, resources and human attention.

Both sexes scent mark, but intact males are the worst offenders, as signaling sexual availability and claiming territory is “encouraged” by the presence of testosterone. In many cases, neutering can significantly reduce a dog’s desire to scent mark, but some continue even after they have been neutered.

Although this is a difficult behavior to work with, taking the following steps can improve the situation: Remove high-value resources that encourage competitive marking and do not allow the dog or dogs who scent mark to roam freely throughout the home. Prevent access to favorite marking spots by restricting the dog(s) to a dog-proofed room or crate when you are unable to actively supervise them. Avoid competitive or vigorous play indoors, as excess activity encourages urination. If your dog is about to mark, interrupt the behavior with a short, sharp vocal noise and immediately direct him to something more positive or take him outside. You can also help an indoormarking dog succeed by walking him in new and different areas; this will encourage him to mark outside rather than in the home.

Training older dogs who are not housebroken to toilet appropriately can also be a challenge. Most dogs raised in a normal domestic situation respond well to a good housetraining schedule, but those who have lived in puppy mills are notoriously difficult. Dogs are essentially clean animals and do not like to toilet where they sleep and eat, but because puppy mill dogs are confined to cramped cages, they are forced to do just that. This makes crate training (a usually successful way to housetrain a dog) much less effective. However, even puppy mill dogs can be taught to toilet appropriately. Go back to basics: allow access to outside areas every hour, then make less-frequent trips as the dog builds up control. Following a schedule establishes a ritual of behavior that eventually becomes predictable and reliable.

Every dog needs to feel confident about toileting, and punishing accidents will only scare the dog into finding ways to toilet in secret. Human patience and sensitivity is the key to success.