How to Train a Dog Not to Bark at Strangers

two dogs - how to get dogs to stop barking?

Does your dog bark whenever the doorbell rings? Or whenever a package arrives? Or whenever someone just walks by your house? It probably seems impossible to stop a barking dog from, well, barking.

In many ways, training a dog to stop their excessive barking is no easy feat. Dogs have been bred to bark; sometimes, a dog's barking is an instinct that they can't control. But you don't need to resort to bark collars to get your dog to stop. Using behaviorist methods, you can change your dog's behavior after a few training sessions so that they are welcoming for every family member and guest who comes to your house.

However, it is important to first understand why your dog is acting this way in order to why your dog is acting this way in order to break bad habits. There are three main reasons why dogs bark at strangers, all of which can be managed if handled correctly. Think of these reasons as a list of 3 ways your dog asks for help, and we’ll set you up with the answer! Whether your dog barks at strangers due to territorial reasons, over-excitement, or lack of human socialization, it is important to expand on each of these three reasons prior to diving into training methods. Keep reading to understand how to train your dog not to bark.

Why Do Dogs Bark?

While there are many reasons that cause dogs to bark, there are three major causes of chronic dog barking: territorial barking, excited barking, and lack of socialization barking. Knowing which of these causes your dog to bark helps inform dog training techniques to specifically stop dog barking.

Territorial Barking

Look at your dog's body language. If your dog often barks when a stranger or new dog approaches your home or yard, accompanied by a stiff body and possibly even raised hackles, it is a definite sign of protecting their territory. Often this happens when someone comes to the front door or merely just walks by. Usually, this means that your dog views them as a potential threat. Although it is beneficial to have a guard dog, this poses a threat to the stranger and also causes a disturbance to anyone in the home or within hearing distance in the neighborhood.


Especially common among puppies, over-excitement is one of the main contributors to barking at strangers. This type of barking, especially when it occurs in areas that a dog would not consider as their territory, is typically not threatening. Rather, they are frankly just excited, expressing their ecstatic energy through loud noises. Usually, this is a strong indicator that your pup is a people lover, which is undeniably a redeeming quality. However positive this aspect may seem to you, it can often catch the stranger off guard and leave them feeling fearful because they don’t personally know your dog.

Lack of Human Socialization

Often times, dogs that did not have a lot of human interaction and attention as a puppy will bark at other humans because they aren’t as familiar with how to act around them and don’t have an established background of trust. This is also common for rescue dogs coming from shelters, where human interaction is not frequent. Similarly, a traumatic experience with previous owners could damage their ability to trust strangers as well. Barking in this situation usually stems from overwhelming anxiety.

Top Training Methods

Remember that even with the best dog training techniques, training your dog to quit barking, which is an inclination by nature, is not going to happen overnight. Consistent training is key, and it is important to be patient with your dog and provide positive reinforcement.

1. The Quiet Method

Once your dog starts barking in the presence of a stranger, let them bark a few times. Then, gently hold their muzzle and say, “Quiet.” Avoid shouting, as that produces negative reinforcement. Take your hands off their muzzle. If they remain quiet, reward them with a treat. If they start barking again, repeat the process, rewarding them each time they stop barking. Gradually increase the time between giving treats, as this allows the command to properly sink in. If holding your dog’s muzzle causes frustration or un-cooperation, you can attempt this method without holding. Instead, calmly use your quiet command, and then divert their attention from the stranger by giving them a treat or snack, like a small piece of chicken.

2. Distraction Method

dog being distracted with a treat to stop dog barking

As simple as it sounds, distracting your pet is one of the best ways to stop the barking. An easy method to distract your dog is by shaking your car keys. The jangling noise diverts your dog's attention towards you. Once you’ve gained their attention, tell them, “sit”, and reward them with a treat upon cooperating. If you practice this consistently, your dog will begin to learn that barking at strangers does not produce a reward, and that good behavior is to their advantage.

3. Preventative Measures

If you have to leave your dog inside or outside without supervision, it is important that you enforce preventative tactics to keep them from engaging with strangers. Learning how to stop dog barking when left alone depends on where you generally keep your dog (inside or outsides). When leaving your dog inside, make sure to keep blinds and curtains closed so that they are unaware of any strangers, for example a mailman, delivering a package or someone walking past your yard on the street. If your dog prefers to be outside, it is helpful to install a tall fence (opaque fencing material is the best for preventing visibility) to limit your dog’s ability to see past your yard.

If your dog often barks when they want to go outside, then you can cut down on their barking by installing a pet door. A high quality pet door like the Endura Flap or Hale Pet Door can give your pet the freedom to come and go as they please. 

4. Going to a “Spot”

If you are at home, the best way to prevent excited barking is by teaching your dog to go to a specific spot in the house and stay there when welcoming someone they do not know into your home. To start this training, make sure your dog has already gone through enough obedience training to know how to sit, lie down, and stay. Once you pick a spot in your house where you would like your dog to go when someone arrives (somewhere at least eight feet away from the door is recommended), you can begin training. Start by saying, “Go to your spot”, and tossing a treat onto the spot where you want your dog to stay. Repeat this about ten times. Once they understand this concept, say the same command, but pretend to toss the treat to get your dog to move toward that spot on their own. Reward them by tossing a treat to the spot to ensure positive reinforcement. Once your dog has the hang of it, practice sending them to their spot from different areas of the house. Incorporate “sit”, “stay”, and “lie down”, rewarding them with treats when they do so.

5. Diverting Attention in Public

For dogs who are overly excited, it is important not to let them continually engage in the barking. If you happen to be walking your dog, many other people may want to engage with them if the barking comes off as excited and nonthreatening, but you want to avoid rewarding your dog for barking for attention. Once your dog notices the stranger, the best way to stop this is to calmly turn around and walk in a different direction, avoiding any chance of engaging. Keep treats with you, that way you can reward your dog after they have stopped barking. After some practice, your dog will begin to learn that barking results in being unable to interact with the person. When your dog calmly approaches another person, reward them for their good behavior.

6. Rewarding Successful Encounters

If your dog is struggling with barking due to the lack of socialization, the number one way to acclimate them to human socialization is through exposure. Invite as many people as you can to your house at different times, asking them to be very affectionate and provide treats. Slowly but surely, your dog will begin to realize that he will be rewarded by new people with love, affection, and treats. Take your dog on as many walks as possible in as many different places as possible so that he/she understands that strangers are not a threat, even if they are in an unfamiliar area.

Best Practices

A lot of us are wondering: “how to stop my dog from barking,” don’t worry, you are not alone! We all want our dogs to be the most loving, well-behaved dogs, and there is more to incorporate into their lives to prevent barking at strangers than just training methods. Another note to keep in mind to train dogs not to bark is to make sure your dog is exercised and has enough toys and activities to wear them out during the day, as it will prevent barking out of boredom. And of course, if any of these methods are not successful, or your dog exhibits aggressive behavior, a professional dog trainer is always a viable option!


Hannah Scholtes

Written by

Hannah Scholtes

The Team is dedicated to providing the highest quality pet doors. As dog and cat lovers ourselves, we aim to write about the topics that matter the most to you and your furry friend. If you have any questions, please contact our customer service team. 🐶🐱

The Team is dedicated to providing the highest quality pet doors. As dog and cat lovers ourselves, we aim to write about the topics that matter the most to you and your furry friend. If you have any questions, please contact our customer service team. 🐶🐱


  • My family recently rescued a 11 yr old Chihuahua and at first she was extremely quiet which was perfect because we live in an apartment building but slowly she started to bark more and more the more she got comfortable. She barks at every noise now and as you can imagine living in an apartment building can be quite noisy. I do believe it is more of a lack of socialization but also a mix of territorial. What I’ve been doing is rather similar to what you’ve suggested but I will practice the distraction method that is new for me maybe that along with the quiet method? I don’t know, any advice?

  • Hi Jackie,

    The first step towards solving this behavior is helping your puppy form positive associations with children to dispel any fears he may have. If all parties involved feel it is safe, you can have a child feed your puppy his favorite treat and give him some gentle pets. Repeat this as often as possible so that your puppy forms a positive association with children.

    However, please note that this method should only be used if you are certain that your puppy is not aggressive with children. If you are unsure, another option is to take your puppy on a walk or sit in a public space and immediately give him a treat anytime he notices a child. This can help him associate the presence of children with a positive outcome to reduce barking.

    I hope this helped answer your question. Happy holidays!

    Elizabeth (Staff)
  • My 11month old puppy barks at children and makes them cry the more the child cries the louder his bark gets , we try to distract him with treats but his that focused on the child that he doesn’t respond

  • Omg i love this article and will definetly try some of these techniques. I have 5 dogs and although they are sweethearts at home and with the family. They seem to be terrible with any stranger. One of them was a pandemic dog so we couldn’t socialize them as much ans know they wont stop barking at everyone. He is a a sweetie at home and i wish he shows that sweet side outside or atleast ignore. My other dog, not even a year old. He is very barky, as soon as he steps outiside he is alreadu huffing and as soon as he sees anything move he’ll bark nonstop. I dont know what to do i want to give them the opportunity to socialize.

    Hannah Castro
  • I have a 4 year old Goldendoodle , we have had since he was a puppy 8 weeks old and the breeder was a male. He barks at everyone that walks by and its sounds very aggressive and also when people arrive at our door he jumps on them and barks aggressively at only men. I have tried to stop this with a clicker and a remote that sends out high pitch noise but nothing is working and seems to get worse. Any advise on how I can fix this issue?

  • Mine does the territorial bark
    It’s hard to break her of it

  • My 9 month old shollie gets time out if she barks at strangers going past our house. When she remembers not to bark, which is getting to be often, I praise her alot. Walmart and Lowes let dogs inside and we practice there.

  • My dog used to be friendly to humans when young but stated to bark at strangers fiercely that goes near him or look at him whenever i bring him for his walk. He doesn’t do this in his training school & in the play school. He is now 11 months old.

  • I have a two year old German Shepard beagle mix. I rescued her from a puppy mill when she was 4 weeks old. I work at an animal shelter and so far training her has been wonderful except the submissive pee! When she was 6 months old I had to give her up due to health issues I have. Unfortunately the man I gave her too abused her. I was glad to get her back and felt guilty for giving her up with all that she endured. Yes, he was punished for what he did to her. Now when anyone comes to visit male or female, she crouches and pees. Along with barking and a wagging tail. I know how to correct it but it’s been almost a year and little progress. Im worried she may live with anxiety forever towards others. I don’t want her to feel that way. She knows she is loved and spoiled by me but I may need extra help with this situation on how to deal with new people.

  • My Dog coco is absolutely awful with her barking and she’s even bit a postman in the past thankfully not too bad but I’ve always thought of training it out of her impossible but after reading this I discovered that she does it out of territorial barking and I’m going to start training as soon as I can. Thanks for this I will try it ASAP

    Grace Morrissey
  • Our dog is a little over 2 yrs old. Is she too old to train. Not barking at everything and everyone is one of things we need stopped.

  • I have e a 2 year old female gsd and a 3month old male gsd my female is awful on walks if she sees other dogs but generally walks well and is a nice natured dog …now my 13 week old male is starting to bark at everyone on walks I can’t seem to distract him I’m going to try the turning around method more often but he tries to turn round to continue barking …its very frustrating as most people just give you a look ….again he’s such a sweet pup just every day I take him out he barks and he’s gonna get bigger and harder deal with

  • We have a year old black Havanese who is very affectionate and gentle but barks at every stranger in a hostile way but sometimes wagging his tail at the same. We took him into a town on a lead and he was completely silent and well behaved . It is driving my wife mad to the point that she is getting close to wanting to be rid of him. Any ideas?

  • I took my puppy from a dog foster home about a year ago. I love him to bits; he has a great personality, and I feel that he loves our family so much, but he barks A LOT… So, leaving home is always a challenge for us. My husband and I were thinking about taking him to ‘doggy school’, but then again, it’s extremely expensive, and the nearest ‘doggy school’ is far away from us. Maybe you have some advice? THANK YOU!!!

    Amanda P
  • Our 2 older dogs,( one is 7, one is 4, both been snipped and females ) always bark at someone coming in door and go berserk when wife gets home from work to

  • I have a super friendly 7month old pup, never shown any aggression just loves people and animals. He was always so good and sat and waiting if anyone passed by us whilst out for the toilet but one day my neighbour didn’t see him and he barked so she came back and fussed him… it’s been a problem ever since every time he sees someone or a dog he barks for attention. I know he’s friendly but he’s a big boy and scares the life out of people sometimes. I don’t want to stop him barking completely as night the simple I see command works but when it’s a friendly bark and not an alert bark his excitement is too much and it doesn’t work…

  • My dog jerry is always barking on stranger people , kids , and others dogs so how can I stop this things plz tell

    Disha Ambadare
  • Hi Jacklyn,

    That sounds like my family puppy I had growing up! We didn’t socialize her as a puppy, so we had to try to do it when she was already grown. You can also talk to a local pet behavioralist to see if there are any other solutions to this issue.

    If you have any questions about any pet door needs, please let us know! You can contact us at

    Grace (Staff)
  • I have a 5 month old pup, who randomly started to bark at strangers during our walks. I do blame myself for it, since when she was younger, I didn’t take her on a sufficient amount of walks. So she didn’t have a ton of interaction with strangers. But now I’m really struggling with it, since I can’t take her on a single walk, without her barking at people.

  • My 3 year old cocker spaniel is the most loving girl to all of us within the home and people she knows but if anyone comes into the home she doesn’t know she barks like mad! Whilst out on walks if we meet someone who has a dog she is absoultly fine and will not bark and play happily with the other dog but if a person is walkong without a dog then she will bark at them! I’ve been told it’s a protective thing over me but it’s very embarrassing as if they don’t know her they might think she is aggressive which she isn’t! Walks are not as enjoyable now as I’m constantly looking for other people and get her back on the lead if I see anyone walking without a dog, luckily she is good on recall

  • Hi Mikenzi,

    That sounds like a frustrating situation. You may benefit from taking your pup to a pet behavioralist to see if there is a way to train her not to bark as much – sometimes it just takes getting used to possible environmental stimuli for dogs to be calmer.

    If you have any questions regarding pet doors, please contact us at or give us a call at (805) 781-7700. Thanks!

    Grace (Staff)
  • I have a 1 year old Maltipoo, I got her when she was 2 weeks old. She barks at everything and everyone. When we go for walks she barks at everyone she sees. Sometimes I have to pick her up to calm her down or have her distracted by one of her chew toys. It gets embarrassing when she barks at everyone and also stressful when I can’t do anything to make her stop. She doesn’t bark when someone else is with her because I’m guessing they have a stern voice with her. Is there anything I can do to calm her down or help her not bark at everyone she sees?

  • Hi Megan,

    We would recommend talking to a pet behavioralist to learn what might be causing your dog to react this way.

    Grace (Staff)
  • I have an 8 month old German shepherd. Some days she won’t bark at strangers at all, but today when I was walking her she barked at every single person she saw. At one point we walked past a large group of people and it was really embarrassing- one of the men shouted at me to muzzle her. She isn’t aggressive and would never attack anybody but it’s mortifying when she barks at people in public. She only does this with me, not when my partner walks her. Is there anything I can do?

  • My pup always barks whenever we have visitors round and sometimes jumps up and snaps he can come across as quite aggressive but after a few minutes he does calm down, I need help in getting him to stop barking and lunging

  • I’ll try this with my dog! Every time my dog sees a person he starts barking and gets very aggressive even though he is a very kind and friendly dog with me and my family. He is a tiny but feisty puppy

  • We have adopted a 1 yr old terrier, he’s barking on everything when we go outside. I used all advices , but when he starts barking and jumping, he doesn’t even hear me anymore. He doesn’t even got treat smell. it’s so frustrating. we hired a professional private trainer , but with 3-4 session and paying a lot, not a bit difference at all.

  • I have a German shepherd dog that will b 2 years old in August. When we go out in my front yard or anywhere if I see someone and I tell her no barking in a quite voice she doesn’t bark. If someone comes in the door at daycare or pops around the corner she gets startled and barks like a maniac. I can’t stop it. I just walk her away. Anything else I can do. Her bark is so loud. She routinely meets people at daycare. She takes a bit to warm up to strangers but does fairly quickly.

    Lisa Dodd
  • Hi Linda,

    That sounds like a tough situation. We would recommend talking to a dog behavioralist to see if they can sense any physical or emotional cues that might be causing your dog to react like this.

    Grace (Staff)
  • We adopted my friends dog a labrodoole age 5. She will not stop barking at my son in law ,he comes to see her everyday but its constant barking ,we have tried so many things and offered her treats but she won’t go near him. She is fine with my nephew and daughter also granddaughter just don’t know what to try with her now. She is ok on a walk when men walk by please any ideas would be great.

    Linda Wilson
  • Clinical animal behaviorist do not advocate these methods involving force. The better way to teach your dog is using positive reinforcement techniques that teach it to be calm. Holding its mouth shut does not teach your dog to not be fearful. Rather it only makes it worse and while it may work temporarily or somewhat, if you want your dog to be all around happier, less anxious and to cure the problem more completely please consult an animal behaviorist that uses positive reinforcement techniques

  • I’ll have to try this with my puppy. She just started barking at people when we go for walks and I think it’s because she wants them to pet her.

  • Looks quite easy have to try

    Ravi Rao

Leave a Comment

Please note, comments must be approved before they are published