Dog pees or poops in the house only when you leave: what it means
House-trained when you're home, accidents every time you go out. That pattern is a clue, not a training failure — and it has three very different causes. How to tell them apart, and why holding it longer never works.

You come home and there it is again. Same spot, probably. And the thing that makes no sense: when you are in the house, your dog is immaculate. Days, weeks, months without an accident. You leave for thirty minutes and the floor tells a different story.
This is one of the most common things owners ask about, and one of the most commonly misdiagnosed — by owners and by well-meaning people in comment sections. The pattern is genuinely informative. It just doesn’t mean what most people assume.
The pattern tells you something. It doesn’t tell you everything.
Soiling that happens only in your absence is a recognised feature of separation-related problems, and it has been part of the diagnostic picture for decades (McCrave, 1991; ASPCA). So the instinct that something is going on when you leave is a reasonable one.
But it is not the only explanation, and jumping straight to “separation anxiety” skips two possibilities that are easier to fix and genuinely common.
Three causes that look identical from the hallway
1. A medical cause. Covered above, and it goes first for a reason. Leaking that happens while a dog is lying down or asleep is a particularly important thing to mention to your vet, because it points somewhere quite different from a dog who is up and anxious.
2. Distress at being left. The dog is frightened or frustrated, and toileting is one of several things that happen when they come apart. Note the “several” — distress rarely arrives on its own. You would usually also expect some of: vocalising, pacing, scratching at the door or the exit route, drooling, or refusing food they would normally take (RSPCA; Overall et al., 2001). Fear and frustration tend to produce slightly different pictures, which is part of why two dogs with the “same” problem need different plans (Lenkei et al., 2018).
3. They never learned to toilet in an empty house. This one gets missed constantly. Toileting is not purely mechanical — most dogs need to be reasonably relaxed to do it, and plenty of dogs have only ever emptied out with a person present, on a walk, or in a garden with the door open. A dog like this is not distressed and not disobedient. They have simply never practised the thing you are expecting. Rescue dogs, kennel-raised dogs and dogs who were always walked rather than let out are all strong candidates.
Telling these apart matters, because the three need completely different plans, and the field has been saying for years that “separation anxiety” is used as a catch-all for several different problems that happen to look alike from the outside (de et al., 2020; Ballantyne, 2018).
How to actually tell: film the first ten minutes
Guessing is optional. Almost everyone has a phone.
Prop it up facing wherever your dog settles, leave as normally as you can, and watch the first ten minutes back. You are not looking for the accident. You are looking for what your dog’s body does in the first minute or two.
- Settles within a few minutes, toilets later, calmly, with no fuss before or after → this looks much more like cause 3 than distress.
- Pacing, whining, scratching, panting, repeatedly returning to the door, cannot settle → that is distress, and the toileting is a symptom rather than the problem.
- Nothing obvious at all, and the accident happens hours in → worth revisiting the medical question with your vet.
The second thing the video gives you is the more useful one: the moment it starts. Not how long your dog was alone, but how many seconds or minutes passed before the first clear sign of worry. That number is the foundation of every sensible plan, and it is usually far smaller than people expect.
Free toolThreshold timerTime your dog’s first sign of worry, save each result, and see what your number means.Open the timer →Why the usual advice doesn’t work here
“Walk him before you go.” Reasonable instinct, and it will empty a bladder. But if the cause is distress, you have now put the most demanding part of the day immediately before the hardest part of the day. Plenty of owners tell us they always walk first and it changes nothing — which is itself a useful piece of information, because it rules out the simplest explanation.
“Crate him.” A crate makes the mess easier to manage, but a dog who soils where they sleep is telling you something: either they were left longer than they could manage, or they are distressed enough to override a very strong instinct not to. Confinement can make separation distress worse rather than better, so this is not the place to start (Ballantyne, 2018).
“Build up from twenty minutes.” This is the most common suggestion in online groups and it is the one that most reliably fails. If your dog comes apart in the first sixty seconds, every twenty-minute absence is forty minutes of rehearsing panic. You cannot stretch a dog’s tolerance from a point they never reach calmly. Programmes that work start below the point where the dog struggles and move up slowly from there (Butler et al., 2011; Blackwell et al., 2006).
“Tell him off when you get home.” Please don’t. Dogs do not connect a telling-off with something they did an hour ago, and the hangdog expression people read as guilt is a reaction to your face and tone in that moment. Training approaches built on punishment are associated with more problem behaviour and poorer welfare, not less (Hiby et al., 2004; Vieira et al., 2020). If the cause is distress, you are adding to the thing causing it.
What to do instead
If it is cause 3 — never learned it — treat outside as a skill being taught from scratch. Go out with them at the times they would normally go, stay boring, don’t play, don’t talk, and go straight back in once they have been. Standing and watching is counterproductive: dogs are vulnerable while they squat and many will not do it while being stared at.
If it is distress, the toileting is not the thing to work on. Find the point at which your dog is still relaxed — which might be ten seconds at the door rather than ten minutes out of the house — and build from under it. The full plan is here, and our free starter guide walks through finding that number.
If your dog is genuinely panicking — not just unsettled, but distressed enough that you find drool, damage or injury — that is worth professional help rather than a self-guided plan, and it is worth asking your vet about medication alongside the training rather than instead of it (Sherman & Mills, 2008). Who to call, and what the different letters after their names mean.
The thing worth holding onto
Your dog is not being spiteful, is not punishing you for going to work, and has not forgotten their training. Something is happening in your absence that does not happen when you are there, and you can find out what it is in about ten minutes of video.
That is a much better position to be in than most people with this problem, who spend a year treating the wrong cause because the pattern looked obvious.
Common questions
Why does my dog only pee in the house when I'm out?
There are three common reasons and they need different answers: a medical cause, distress at being left, or simply never having learned to toilet in an empty house. The pattern alone can't tell you which. Filming the first ten minutes usually can.
Is my dog doing it out of spite or to punish me for leaving?
No. Dogs don't toilet to make a point, and the guilty look you see when you come home is a response to your face and voice, not evidence that they knew what they did. Telling a dog off afterwards adds to the problem without touching the cause.
Should I crate my dog to stop the accidents?
Not as a first move. A crate stops the mess being visible, but a dog who soils where they sleep is usually either held longer than they can manage or distressed — and confinement can make distress worse. Find out which is happening before you change the space.
How long can a dog hold it?
It varies hugely with age, size and health, and it is the wrong question here. If your dog toilets within ten minutes of you leaving, the problem isn't bladder capacity — something else is going on.
Stop guessing how long to leave your dog.
An 82-page illustrated guide, a fillable workbook, an Excel tracker that tells you what to do after every session, and a one-page card for the fridge. 111 cited sources.