If you--like every other dog-loving human on the planet-- have been hugging your dog (and the dogs of friends and even strangers), you may want to reconsider how you show affection to your canine friends.
According to a recent study in Psychology Today, dogs hate being hugged. To conduct the study, researchers found 250 photos of people hugging their dogs, and analyzed the dog's body language in each photo. 82% of the dogs showed one or more signs of stress, indicating that the dogs has anxiety while being hugged.
For humans, it seems second-nature to hug a dog that we love, just like you would do to another person, but Stanley Coren, who lead the project and studies canine behavior at the University of British Columbia, explains why an embrace would scare or agitate a dog:
"Dogs are technically cursorial animals, which is a term that indicates that they are designed for swift running. That implies that in times of stress or threat the first line of defense that a dog uses is not his teeth, but rather his ability to run away. Behaviorists believe that depriving a dog of that course of action by immobilizing him with a hug can increase his stress level and, if the dog's anxiety becomes significantly intense, he may bite."
Basically, as much as we love our dogs, it's safer if we refrain from flinging our arms around their necks and holding them close. They much prefer a treat to a hug.