Dog barks when you leave? Start with the first few minutes
You close the door. Your dog barks. Is this separation anxiety, boredom, a reaction to hallway noise, or something else? The bark alone cannot tell you. The first useful step is to see what actually happens after you leave.
Set up a safe camera or phone recording for a brief absence. Note when barking begins and whether it stops. Look for pacing, panting, drooling, attempts to escape, or damage concentrated near doors and windows. The ASPCA notes that dogs with separation anxiety may show distress soon after departure, and that escape attempts can injure them. A recording gives you observations, not a diagnosis, but it keeps you from building a plan around a guess.
Don't make the next absence a test of endurance
If the recording shows panic, repeating long absences and hoping the dog will "get used to it" can leave the dog distressed. The ASPCA describes treatment as gradual exposure to being alone without triggering fear. In practice, that means working at a duration the individual dog can handle, often beginning with extremely short separations and advancing only while the dog stays comfortable. There is no universal starting number of seconds.
While you work on a plan, arrange care or company for unavoidable long absences where possible. This is a management bridge, not a cure and not always easy to arrange. If your dog is injuring themselves or cannot tolerate even tiny absences, ask your veterinarian promptly for help and a referral to a qualified behavior professional. The ASPCA also discusses veterinary treatment for more severe cases.
Notice departure cues, not just the door
Some dogs start worrying at the keys, shoes, or bag, before anyone leaves. Write down the earliest cue that changes your dog's behavior. That cue may need gentler practice too. Do not repeatedly fake departures if each rehearsal sends your dog into panic; work from a level the dog can tolerate.
What to track this week
Keep a plain log: date, length of absence, time barking began, other distress signs, and whether the dog settled. Compare recordings rather than relying on what a neighbor heard through a wall. A quieter minute is progress, but silence alone is not proof a dog feels safe: look at the whole dog.
If the behavior is new or has intensified, a veterinary check can help rule out health issues and guide next steps. Your aim is not to make the dog "obey" the closed door. It is to help the dog feel safe on the other side of it, at a pace they can actually manage.
Further reading: ASPCA, “Separation Anxiety,” https://www.aspca.org/pet-care/dog-care/common-dog-behavior-issues/separation-anxiety .
Find the right starting point on the home page.