According to the American Veterinary Medical Association, there are steps that you can take to prevent dog bites, including:
Socializing your dog regularly
Being a responsible owner, including training and exercising your dog
Educating your family about how to properly approach a dog
Avoiding risky situations, such as approaching a dog when it is alone, injured, or eating
Reading a dog’s body language, especially it is seems frightened or stressed