Why do dogs shake their heads when they bark?

If your dog is barking only when shaking his head this is likely to be out of excitement. If it is a constant shaking of the head even when he isn’t barking then it may be an ear infection.